From 2587a5b5debbaf8a1036f03e6fccfb68b6e4efec Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Thu, 16 Jul 2009 01:54:22 +0000 Subject: [PATCH] correct the zxJDBC disconnect matching --- lib/sqlalchemy/connectors/zxJDBC.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/sqlalchemy/connectors/zxJDBC.py b/lib/sqlalchemy/connectors/zxJDBC.py index 3992ba6071..ab446c575c 100644 --- a/lib/sqlalchemy/connectors/zxJDBC.py +++ b/lib/sqlalchemy/connectors/zxJDBC.py @@ -33,12 +33,7 @@ class ZxJDBCConnector(Connector): return [[d, u, p, v], self._driver_kwargs()] def is_disconnect(self, e): - if isinstance(e, self.dbapi.ProgrammingError): - return "The cursor's connection has been closed." in str(e) or 'Attempt to use a closed connection.' in str(e) - elif isinstance(e, self.dbapi.Error): - return '[08S01]' in str(e) - else: - return False + return isinstance(e, self.dbapi.ProgrammingError) and 'connection is closed' in str(e) def _get_server_version_info(self, connection): # use connection.connection.dbversion, and parse appropriately -- 2.47.3