]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add another exception case to Firebird' is_disconnect()
authorLele Gaifax <lele@metapensiero.it>
Mon, 12 May 2008 13:51:14 +0000 (13:51 +0000)
committerLele Gaifax <lele@metapensiero.it>
Mon, 12 May 2008 13:51:14 +0000 (13:51 +0000)
lib/sqlalchemy/databases/firebird.py

index 243bd46d80b290c6e7a253a3a96cca5b5f61965f..3377a60048cd1a1b04782ce1cc8fec1052e25c71 100644 (file)
@@ -398,7 +398,9 @@ class FBDialect(default.DefaultDialect):
         if isinstance(e, self.dbapi.OperationalError):
             return 'Unable to complete network request to host' in str(e)
         elif isinstance(e, self.dbapi.ProgrammingError):
-            return 'Invalid connection state' in str(e)
+            msg = str(e)
+            return ('Invalid connection state' in msg or
+                    'Invalid cursor state' in msg)
         else:
             return False