mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Fixes #29
The errors list was not being cleared out after resuming a backup from a rate limit sleep. When the backup was resumed, the non-empty errors list caused the backup to quit after the next `retrieve_data` request.
This commit is contained in:
@@ -299,10 +299,10 @@ def get_query_args(query_args=None):
|
|||||||
|
|
||||||
def _get_response(request, auth, template):
|
def _get_response(request, auth, template):
|
||||||
retry_timeout = 3
|
retry_timeout = 3
|
||||||
errors = []
|
|
||||||
# We'll make requests in a loop so we can
|
# We'll make requests in a loop so we can
|
||||||
# delay and retry in the case of rate-limiting
|
# delay and retry in the case of rate-limiting
|
||||||
while True:
|
while True:
|
||||||
|
errors = []
|
||||||
should_continue = False
|
should_continue = False
|
||||||
try:
|
try:
|
||||||
r = urllib2.urlopen(request)
|
r = urllib2.urlopen(request)
|
||||||
|
|||||||
Reference in New Issue
Block a user