VirtualMailManager/Exceptions.py
changeset 61 d85482575349
parent 55 15c873f94ba6
child 76 14c0a092d7d2
equal deleted inserted replaced
60:ac2fa80d9faf 61:d85482575349
    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