BaseException.message is deprecated since 2.6. Fixes #5465
This commit is contained in:
parent
684f45b148
commit
a0fea76ff2
|
@ -20,13 +20,15 @@ class BaseError(Exception):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, message, command=None, name=None):
|
def __init__(self, message, command=None, name=None):
|
||||||
|
self.message = message
|
||||||
|
|
||||||
self.command = command
|
self.command = command
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
if command and not name:
|
if command and not name:
|
||||||
self.name = command.first_name
|
self.name = command.first_name
|
||||||
|
|
||||||
super(BaseError, self).__init__(message)
|
super(BaseError, self).__init__()
|
||||||
|
|
||||||
class DefinitionError(BaseError):
|
class DefinitionError(BaseError):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue