aboutsummaryrefslogtreecommitdiff
path: root/pandora/transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'pandora/transport.py')
-rw-r--r--pandora/transport.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pandora/transport.py b/pandora/transport.py
index 1a2ee69..8fab7af 100644
--- a/pandora/transport.py
+++ b/pandora/transport.py
@@ -46,7 +46,11 @@ def retries(max_tries, exceptions=(Exception,)):
46 retries_left -= 1 46 retries_left -= 1
47 return func(*args, **kwargs) 47 return func(*args, **kwargs)
48 48
49 except exceptions: 49 except exceptions as e:
50 # Don't retry for PandoraExceptions - unlikely that result
51 # will change for same set of input parameters.
52 if isinstance(e, PandoraException):
53 continue
50 if retries_left > 0: 54 if retries_left > 0:
51 time.sleep(delay_exponential( 55 time.sleep(delay_exponential(
52 0.5, 2, max_tries - retries_left)) 56 0.5, 2, max_tries - retries_left))