Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 582c09a

Browse files
Syntactical adjustment to is_disconnect
1 parent e7ab6cd commit 582c09a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sqla_vertica_python/vertica_python.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ def initialize(self, connection):
6666
self.implicit_returning = False
6767

6868
def is_disconnect(self, e, connection, cursor):
69-
if isinstance(e, self.dbapi.Error) and connection is not None:
70-
return connection.closed()
71-
return False
69+
return (
70+
isinstance(e, self.dbapi.Error) and
71+
connection is not None and
72+
connection.closed()
73+
)
7274

7375
@classmethod
7476
def dbapi(cls):

0 commit comments

Comments
 (0)