From 7499d8e511ce3f5588a16702c9533233ec716cab Mon Sep 17 00:00:00 2001 From: Paul Lamere Date: Sun, 22 Jan 2017 08:04:51 -0500 Subject: [PATCH] Adjusted retry sleep backoff --- spotipy/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spotipy/client.py b/spotipy/client.py index a45d4d3..ad0e082 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -156,7 +156,7 @@ class Spotify(object): else: sleep_seconds = int(e.headers.get('Retry-After', delay)) print ('retrying ...' + str(sleep_seconds) + 'secs') - time.sleep(sleep_seconds) + time.sleep(sleep_seconds + 1) delay += 1 else: raise @@ -169,7 +169,7 @@ class Spotify(object): if retries >= 0: sleep_seconds = int(e.headers.get('Retry-After', delay)) print ('retrying ...' + str(delay) + 'secs') - time.sleep(sleep_seconds) + time.sleep(sleep_seconds + 1) delay += 1 else: raise