dbapi.py
changeset 4592 ddbab12acae0
parent 4252 6c4f109c2b03
child 4705 8ae13d059850
--- a/dbapi.py	Tue Feb 16 09:23:35 2010 +0100
+++ b/dbapi.py	Tue Feb 16 09:24:40 2010 +0100
@@ -263,6 +263,8 @@
 
     def get_session_data(self, key, default=None, pop=False):
         """return value associated to `key` in session data"""
+        if self.cnx is None:
+            return None # before the connection has been established
         return self.cnx.get_session_data(key, default, pop)
 
     def set_session_data(self, key, value):