]> err.no Git - dak/commitdiff
* daklib/dak_exceptions.py: Add a default message and tidy up our string
authorMark Hymers <mhy@debian.org>
Mon, 5 May 2008 13:54:03 +0000 (14:54 +0100)
committerMark Hymers <mhy@debian.org>
Mon, 5 May 2008 13:54:03 +0000 (14:54 +0100)
  representation

ChangeLog
daklib/dak_exceptions.py

index 76d6a4bb8f58414b94ab5cbf71067e6df3fa73f0..869ff621074f38b5ca3e8c376d09b2467132c27d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-05  Mark Hymers  <mhy@debian.org>
+
+       * daklib/dak_exceptions.py: Add a default message and tidy up our string
+       representation
+
 2008-05-05  Joerg Jaspert  <joerg@debian.org>
 
        * daklib/dak_exceptions.py: New file, central place for all those
index e9ab2c720c8b3501d843f1b1d109e89ea2264d5d..e488ac9dae2d9d88f28317b7b5596b4ab2262212 100644 (file)
@@ -28,9 +28,12 @@ class DakError(Exception):
        message -- explanation of the error
     """
 
-    def __init__(self, message):
-        self.args = message
-        self.message = message
+    def __init__(self, message=""):
+        self.args = str(message)
+        self.message = str(message)
+
+    def __str__(self):
+        return self.message
 
 __all__ = ['DakError']