Added more useful repr for sessions.
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 29 Jun 2012 01:31:25 +0000 (03:31 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 29 Jun 2012 01:31:25 +0000 (03:31 +0200)
wrw/session.py

index 428c93d..3b2b2b2 100644 (file)
@@ -70,6 +70,9 @@ class session(object):
             self.__dict__[k] = v
         # The proper lock is set by the thawer
 
+    def __repr__(self):
+        return "<session %s>" % self.id
+
 class db(object):
     def __init__(self, backdb = None, cookiename = "wrwsess", path = "/"):
         self.live = {}