Skip to content

Commit

Permalink
Fix issue with null curl output with non-zero retcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Apr 17, 2016
1 parent 18f8dc2 commit b0d9bb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/repo_sync
Expand Up @@ -380,7 +380,9 @@ def curl(url, destinationpath, onlyifnewer=False, etag=None, resume=False):

retcode = proc.poll()
if retcode:
curlerr = proc.stderr.read().rstrip('\n').split(None, 2)[2]
curlerr = proc.stderr.read().rstrip('\n')
if curlerr:
curlerr = curlerr.split(None, 2)[2]
if os.path.exists(tempdownloadpath):
if (not resume) or (retcode == 33):
# 33 means server doesn't support range requests
Expand Down

0 comments on commit b0d9bb7

Please sign in to comment.