Message5589
I had to modify the patch a little.
In roundup.cgi.exceptions added DetectorError the the import:
from roundup.cgi.exceptions import (...}
This fixed an undefined global DetectorError at:
except DetectorError as e:
later in the file.
I had to hand apply the import section for roundup/hyperdb.py.
Also I had to change the patch:
+ if not self.instance.config.WEB_DEBUG:
+ self.send_error_to_admin(e.subject, e.html, e.txt)
+ self.write_html(self._(error_message))
self._(error_message) is not defined. I replaced it with e.html which
is what is sent to the user when WEB_DEBUG is true (exposing the
traceback to the user) as well.
In the tracker's config.ini I tested with [web].debug set to true and
false and [mail].debug set to log.mail.txt.
I also installed test_detector.py in the tracker detectors directory.
I have attached test_detector.py. If the status of an issue changes it
raises an IOError during audit. If the nosy list is not empty,
after the transaction, it raises an IOEerror from the reactor.
It passes all other update types through without error.
Running without the patch, I get a reset from server. With the patch I
get a traceback displayed to the user. If [web].debug is false, I also get
an email sent to the administrator.
I am going to commit this since it handles the error condition better.
However I am not positive that the error is being rendered to the user
when [web].debug is not set as the author expected.
Also I am not sure how to craft an automated test for this.
But if the attached detector is useful, that's fine. |
|
Date |
User |
Action |
Args |
2016-06-11 03:17:30 | rouilj | set | messageid: <1465615050.02.0.437918641873.issue2550826@psf.upfronthosting.co.za> |
2016-06-11 03:17:30 | rouilj | set | recipients:
+ rouilj, ber, tekberg |
2016-06-11 03:17:30 | rouilj | link | issue2550826 messages |
2016-06-11 03:17:29 | rouilj | create | |
|