diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pg8000.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/pg8000.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index cda0bc941..43df6edea 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -328,9 +328,9 @@ class PGDialect_pg8000(PGDialect): return ([], opts) def is_disconnect(self, e, connection, cursor): - if isinstance( - e, self.dbapi.InterfaceError - ) and "network error" in str(e): + if isinstance(e, self.dbapi.InterfaceError) and "network error" in str( + e + ): # new as of pg8000 1.19.0 for broken connections return True |