Fixed erroneous merge.
[wrw.git] / wrw / session.py
index 8141827..fc918f4 100644 (file)
@@ -1,5 +1,5 @@
 import threading, time, pickle, random, os
-from . import cookie, env, proto
+import cookie, env, proto
 
 __all__ = ["db", "get"]
 
@@ -77,7 +77,7 @@ class db(object):
     def clean(self):
         now = int(time.time())
         with self.lock:
-            clist = list(self.live.keys())
+            clist = self.live.keys()
         for sessid in clist:
             with self.lock:
                 try:
@@ -195,7 +195,7 @@ class db(object):
         data = self.backdb[sessid]
         try:
             return pickle.loads(data)
-        except:
+        except Exception, e:
             raise KeyError()
 
     def freeze(self, sess):