Skip to content

Commit

Permalink
Fix definition of connected
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-whitestone committed Aug 26, 2018
1 parent da0ae48 commit 2e8da93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgrez/postgrez.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _connected(self):
connect_status (bool): True of a psycopg2 connection or cursor
object exists.
"""
return (True if self.conn.closed == 1 else False)
return (True if self.conn.closed == 0 else False)

def _connect(self):
"""Create a connection to a PostgreSQL database.
Expand Down

0 comments on commit 2e8da93

Please sign in to comment.