BaseException.message is deprecated since 2.6. Fixes #5465

This commit is contained in:
Alexander Cherniuk 2009-11-30 14:58:43 +02:00
parent 684f45b148
commit a0fea76ff2
1 changed files with 3 additions and 1 deletions

View File

@ -20,13 +20,15 @@ class BaseError(Exception):
"""
def __init__(self, message, command=None, name=None):
self.message = message
self.command = command
self.name = name
if command and not name:
self.name = command.first_name
super(BaseError, self).__init__(message)
super(BaseError, self).__init__()
class DefinitionError(BaseError):
"""