src/modules/client/history.py
changeset 1540 de040c9fd0c0
parent 1516 8c950a3b4171
child 1658 49b8cc06eecb
--- a/src/modules/client/history.py	Thu Dec 03 10:19:16 2009 +0000
+++ b/src/modules/client/history.py	Thu Dec 03 15:56:02 2009 -0600
@@ -97,10 +97,17 @@
 
 class _HistoryException(Exception):
         """Private base exception class for all History exceptions."""
+
         def __init__(self, *args):
                 Exception.__init__(self, *args)
                 self.error = args[0]
 
+        def __unicode__(self):
+                # To workaround python issues 6108 and 2517, this provides a
+                # a standard wrapper for this class' exceptions so that they
+                # have a chance of being stringified correctly.
+                return str(self)
+
         def __str__(self):
                 return str(self.error)