aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcass <john.cass77@gmail.com>2016-01-12 18:04:18 +0200
committerjcass <john.cass77@gmail.com>2016-01-12 18:04:18 +0200
commit4349a4a92f2c0581531b10fd39b6a938ef465d57 (patch)
treec62bef52bc75853626cb69368734414d9772a68a
parentc5353abd5594a14b2cbdb713fe6855ec467659ab (diff)
downloadpydora-4349a4a92f2c0581531b10fd39b6a938ef465d57.tar.bz2
pydora-4349a4a92f2c0581531b10fd39b6a938ef465d57.tar.xz
pydora-4349a4a92f2c0581531b10fd39b6a938ef465d57.zip
Should 'break' from while loop to avoid retries, not continue.
-rw-r--r--pandora/transport.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pandora/transport.py b/pandora/transport.py
index 8fab7af..5681aec 100644
--- a/pandora/transport.py
+++ b/pandora/transport.py
@@ -50,7 +50,7 @@ def retries(max_tries, exceptions=(Exception,)):
50 # Don't retry for PandoraExceptions - unlikely that result 50 # Don't retry for PandoraExceptions - unlikely that result
51 # will change for same set of input parameters. 51 # will change for same set of input parameters.
52 if isinstance(e, PandoraException): 52 if isinstance(e, PandoraException):
53 continue 53 break
54 if retries_left > 0: 54 if retries_left > 0:
55 time.sleep(delay_exponential( 55 time.sleep(delay_exponential(
56 0.5, 2, max_tries - retries_left)) 56 0.5, 2, max_tries - retries_left))