changeset 13599:0bef8f69c078

don't depend on features of Exception as much BaseException.message has been deprecated, so we try to not rely on it.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Sat, 12 Mar 2011 15:51:39 +0100
parents 241380fcc402
children 0388e3e36693
files mercurial/hgweb/common.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):