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