]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
comments/question about using connection.closed in is_disconnect method
authorBrad Allen <bradallen137@gmail.com>
Thu, 18 Mar 2010 15:12:06 +0000 (09:12 -0600)
committerBrad Allen <bradallen137@gmail.com>
Thu, 18 Mar 2010 15:12:06 +0000 (09:12 -0600)
lib/sqlalchemy/connectors/mxodbc.py

index d03fdb5ffcb26ac349816f2e68a633eba2c206fa..030d5418ba9be4e305146e487de9408a7416026f 100644 (file)
@@ -93,6 +93,8 @@ class MxODBCConnector(Connector):
         return args, kwargs
 
     def is_disconnect(self, e):
+        # eGenix recommends checking connection.closed here,
+        # but how can we get a handle on the current connection?
         if isinstance(e, self.dbapi.ProgrammingError):
             return "connection already closed" in str(e)
         elif isinstance(e, self.dbapi.Error):