don't depend on features of Exception as much
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Sat, 12 Mar 2011 15:51:39 +0100
changeset 13599 0bef8f69c078
parent 13595 241380fcc402
child 13601 0388e3e36693
don't depend on features of Exception as much BaseException.message has been deprecated, so we try to not rely on it.
mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py	Sat Mar 12 13:06:50 2011 +0100
+++ b/mercurial/hgweb/common.py	Sat Mar 12 15:51:39 2011 +0100
@@ -73,10 +73,12 @@
     def __init__(self, code, message=None, headers=[]):
         if message is None:
             message = _statusmessage(code)
-        Exception.__init__(self, code, message)
+        super(Exception, self).__init__()
         self.code = code
         self.message = message
         self.headers = headers
+    def __str__(self):
+        return self.message
 
 class continuereader(object):
     def __init__(self, f, write):