Skip to content

Commit

Permalink
Fix boolean method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Jul 15, 2019
1 parent 49ffb7f commit aa0e501
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/relstorage/storage/connections.py
Expand Up @@ -224,6 +224,11 @@ def __init__(self, connection):
self.isolated_connection = connection.isolated_connection
self.restart_and_call = connection.restart_and_call

def __bool__(self):
return bool(self.__connection)

__nonzero__ = __bool__

@property
def connection(self):
return self.__connection.connection
Expand Down

0 comments on commit aa0e501

Please sign in to comment.