summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-13 21:21:56 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-13 21:21:56 +0200
commit8af4942857cb8eb906056df4c4ae7ffefe9e229c (patch)
tree1de57da41a84c5e9d2dd9e4b409563a832550132
parent673edfd36e1d02a629838d3a408155779af50912 (diff)
downloadportato-8af4942857cb8eb906056df4c4ae7ffefe9e229c.tar.gz
portato-8af4942857cb8eb906056df4c4ae7ffefe9e229c.tar.bz2
portato-8af4942857cb8eb906056df4c4ae7ffefe9e229c.zip
Better eix error inheritance and handling
Diffstat (limited to '')
-rw-r--r--portato/eix/exceptions.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/portato/eix/exceptions.py b/portato/eix/exceptions.py
index 1ca05e1..cc4665d 100644
--- a/portato/eix/exceptions.py
+++ b/portato/eix/exceptions.py
@@ -23,7 +23,14 @@ class EixError (Exception):
:ivar message: The error message
"""
+
message = _("Unknown error.")
+
+ def __init__ (self, msg = None):
+ Exception.__init__(self)
+
+ if msg:
+ self.message = msg
def __str__ (self):
return self.message
@@ -34,7 +41,7 @@ class EndOfFileException (EixError):
"""
def __init__ (self, filename):
- self.message = _("End of file reached though it was not expected: '%s'") % filename
+ EixError.__init__(self, _("End of file reached though it was not expected: '%s'") % filename)
class UnsupportedVersionError (EixError):
"""
@@ -42,4 +49,4 @@ class UnsupportedVersionError (EixError):
"""
def __init__ (self, version):
- self.message = _("Version '%s' is not supported.") % version
+ EixError.__init__(self, _("Version '%s' is not supported.") % version)
dd0c481362f30e63e4&follow=1'>Generate correct KeyNotFoundExceptionRené 'Necoro' Neumann1-2/+2 2008-03-09Small changesRené 'Necoro' Neumann3-1/+4 2008-03-07Better session handlingRené 'Necoro' Neumann1-5/+54 2008-03-07Small changesRené 'Necoro' Neumann1-1/+4 2008-03-07Updated shm module to 1.2René 'Necoro' Neumann1-8/+21 2008-03-07Update TODORené 'Necoro' Neumann1-3/+1 2008-03-07hmm ... yesRené 'Necoro' Neumann1-1/+1 2008-03-06Used better exceptions for configuration parserRené 'Necoro' Neumann1-26/+114 2008-03-06Update translationRené 'Necoro' Neumann2-349/+393 2008-03-06Update createpot.shRené 'Necoro' Neumann1-3/+2 2008-03-06Use 'nofork' instead of 'nolistener'René 'Necoro' Neumann1-3/+3 2008-03-05Install glade files into template dir and not data dirRené 'Necoro' Neumann2-2/+1 2008-03-05Added dependency listRené 'Necoro' Neumann3-117/+237