Skip to content

Commit

Permalink
Make sure the self.socket_file argument is valid before trying to pri…
Browse files Browse the repository at this point in the history
…nt it in a log message. Issue 76
  • Loading branch information
Dwight Hubbard committed Aug 2, 2015
1 parent b05a1c2 commit 2e53c4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions redislite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ def _cleanup(self):
)
self.connection_pool.disconnect()
else:
logger.debug(
'Redis is not running on socket %s, skipping cleanup',
self.socket_file
) # pragma: no cover
if self.socket_file:
logger.debug(
'Redis is not running on socket %s, skipping cleanup',
self.socket_file
) # pragma: no cover

self.running = False
self.redis_dir = None
Expand Down

0 comments on commit 2e53c4b

Please sign in to comment.