summaryrefslogtreecommitdiff
path: root/portato/eix/exceptions.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-14 22:28:19 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-14 22:28:19 +0200
commit67d927540ee10dbf70b9b71eda152605a63bbc90 (patch)
tree7247e43b1b159439743e6c77edfd4124b9fe63e2 /portato/eix/exceptions.py
parent06f03d7aa376c8164eff5068a412e76cf2c0b0a9 (diff)
parente5b5b6793999a5094832b1819cc6b5e5e5f0ca39 (diff)
downloadportato-67d927540ee10dbf70b9b71eda152605a63bbc90.tar.gz
portato-67d927540ee10dbf70b9b71eda152605a63bbc90.tar.bz2
portato-67d927540ee10dbf70b9b71eda152605a63bbc90.zip
Merge branch '0.14'
* 0.14: Make some useless info messages being debug statements Improve the C modules Small modifications made to the French translation (typos, grammar). Fixed the unicode support and stuff ... and also made eix faster :) Disable debug messages by default Better eix error inheritance and handling
Diffstat (limited to 'portato/eix/exceptions.py')
-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 95283ac..955da42 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)