equal
deleted
inserted
replaced
16 class VMMException(Exception): |
16 class VMMException(Exception): |
17 """Exception class for VirtualMailManager exceptions""" |
17 """Exception class for VirtualMailManager exceptions""" |
18 def __init__(self, msg, code): |
18 def __init__(self, msg, code): |
19 Exception.__init__(self, msg) |
19 Exception.__init__(self, msg) |
20 self._code = int(code) |
20 self._code = int(code) |
|
21 ### for older python versions, like py 2.4.4 on OpenBSD 4.2 |
|
22 if not hasattr(self, 'message'): |
|
23 self.message = msg |
21 |
24 |
22 def msg(self): |
25 def msg(self): |
23 """Returns the exception message.""" |
26 """Returns the exception message.""" |
24 return self.message |
27 return self.message |
25 |
28 |