[http] Make a better __repr__ for Status responce exception. stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 16 May 2011 10:19:22 +0200
branchstable
changeset 7384 69aa88765db5
parent 7376 38524ca653e5
child 7389 c2b29631c1a3
[http] Make a better __repr__ for Status responce exception. This help debug.
web/_exceptions.py
--- a/web/_exceptions.py	Fri May 13 10:09:54 2011 +0200
+++ b/web/_exceptions.py	Mon May 16 10:19:22 2011 +0200
@@ -53,6 +53,9 @@
         self.status = int(status)
         self.content = content
 
+    def __repr__(self):
+        return '%s(%r, %r)' % (self.__class__.__name__, self.status, self.content)
+
 class InvalidSession(CubicWebException):
     """raised when a session id is found but associated session is not found or
     invalid