[issue2551057] No message with DetectorError with Python2
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from Ralf Schlatterbeck:
When a detector has a serious problem (e.g. I/O Error, division by zero,
etc,) ultimately a DetectorError is raised. This is defined in
cgi/exceptions.py.
Now I got a Detector Error without any message about what was wrong.
Looks like the Detector Error *does* print its parameters with python3
but not with python2, see the test-script below.
Anybody in-the-know can tell us how to correctly define a custom
exception in python2 that prints its parameters?
python3:
>>> from roundup.cgi.exceptions import DetectorError
>>> raise DetectorError ('Bla', 'some html', 'some text')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
roundup.cgi.exceptions.DetectorError: ('Bla', 'some html', 'some text')
python2:
>>> from roundup.cgi.exceptions import DetectorError
>>> raise DetectorError ('Bla', 'some html', 'some text')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
roundup.cgi.exceptions.DetectorError
----------
keywords: Effort-High, python2
messages: 6623
nosy: schlatterbeck
priority: high
severity: normal
status: new
title: No message with DetectorError with Python2
versions: devel
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551057>
_________________________________________________