Fix __init__ for BaseException to be completely backwards-compatible for
'args'.
This commit is contained in:
parent
1070997d4f
commit
ad551cb280
|
@ -63,12 +63,10 @@ will cause the deprecation of the existing ``args`` attribute)::
|
|||
|
||||
"""
|
||||
|
||||
def __init__(self, message='', *args):
|
||||
def __init__(self, *args):
|
||||
"""Set 'message' and 'args' attribute"""
|
||||
self.message = message
|
||||
self.args = ((message,) + args
|
||||
if message != ''
|
||||
else tuple())
|
||||
self.args = args
|
||||
self.message = args[0] if args else ''
|
||||
|
||||
def __str__(self):
|
||||
"""Return the str of 'message'"""
|
||||
|
|
Loading…
Reference in New Issue