Roundup Tracker - Issues

Issue 1608074

classification
Exception.args and python 2.5
Type: Severity: normal
Components: None Versions:
process
Status: closed
:
: : trickos
Priority: normal :

Created on 2006-12-03 21:10 by trickos, last changed 2006-12-03 21:10 by trickos.

Messages
msg2362 Author: [hidden] (trickos) Date: 2006-12-03 21:10
Hello,
I had hard time debugging a roundup configuration issue under python 2.5 on WinXP because the ConfigureError hierarchy seems to be broken. Because of: 
"""
class ConfigurationError(Exception):
    # without this, pychecker complains about missing class attribute...
    args = ()
"""
in configuration.py (line 24), the "args" variable is no longer set upon derived exception constructions, which eventually triggers an IndexError when trying to read "self.args[0].name" in OptionUnsetError.__str__ for instance.

I do not really understand what's going under the hood, but I know the Exception.args attribute was declared deprecated in 2.5 (maybe the single argument is put in "message" instead of "args" and the "args" is now simulated throught some kind of __attr__ hook).

Removing the "args = ()" statement is enough to make the issue disappear and have a meaningful exception being raised.

Patrick

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32.
Windows XP
History
Date User Action Args
2006-12-03 21:10:35trickoscreate