Skip to content

Commit

Permalink
Merge pull request jplana#145 from pax0r/clear-response
Browse files Browse the repository at this point in the history
Make response False on exception
  • Loading branch information
lavagetto committed Dec 1, 2015
2 parents ebd7036 + 31f57fa commit 4640358
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/etcd/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,11 @@ def wrapper(self, path, method, params=None, timeout=None):
# machines left to try, breaking out of the loop.
self._base_uri = self._next_server(cause=e)
some_request_failed = True

# if exception is raised on _ = response.data
# the condition for while loop will be False
# but we should retry
response = False
else:
_log.debug("Reconnection disabled, giving up.")
raise etcd.EtcdConnectionFailed(
Expand Down

0 comments on commit 4640358

Please sign in to comment.