dbapi.py
changeset 6012 d56fd78006cd
parent 5863 4495b9bc49df
child 6013 8ca424bc393b
--- a/dbapi.py	Mon Jul 26 12:07:00 2010 +0200
+++ b/dbapi.py	Mon Jul 26 12:08:24 2010 +0200
@@ -507,10 +507,12 @@
         return DBAPIRequest(self.vreg, DBAPISession(self))
 
     def check(self):
-        """raise `BadConnectionId` if the connection is no more valid"""
+        """raise `BadConnectionId` if the connection is no more valid, else
+        return its latest activity timestamp.
+        """
         if self._closed is not None:
             raise ProgrammingError('Closed connection')
-        self._repo.check_session(self.sessionid)
+        return self._repo.check_session(self.sessionid)
 
     def set_session_props(self, **props):
         """raise `BadConnectionId` if the connection is no more valid"""