diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-26 18:30:32 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-01-31 21:12:08 +0900 |
commit | 87b9d9b4f2b9540fdd23a2b13af622d04a15269a (patch) | |
tree | 384354273f799e1928461ea1d962020c0142bfc3 | |
parent | 4e46520362e4c75ae7809c74f3d1c21e86852ee8 (diff) | |
download | git-repo-87b9d9b4f2b9540fdd23a2b13af622d04a15269a.tar.gz |
Don't exit with error on HTTP 403 when downloading clone bundle
If the server returns HTTP 403 (forbidden) when attempting to
download clone bundle files, ignore it and continue, rather than
exiting with a fatal error.
Change-Id: Icf78cba0332b51b0e7b622f7c7924369b551b6f6
-rwxr-xr-x | repo | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -428,7 +428,7 @@ def _DownloadBundle(url, local, quiet): | |||
428 | try: | 428 | try: |
429 | r = urllib.request.urlopen(url) | 429 | r = urllib.request.urlopen(url) |
430 | except urllib.error.HTTPError as e: | 430 | except urllib.error.HTTPError as e: |
431 | if e.code == 404: | 431 | if e.code in [403, 404]: |
432 | return False | 432 | return False |
433 | print('fatal: Cannot get %s' % url, file=sys.stderr) | 433 | print('fatal: Cannot get %s' % url, file=sys.stderr) |
434 | print('fatal: HTTP error %s' % e.code, file=sys.stderr) | 434 | print('fatal: HTTP error %s' % e.code, file=sys.stderr) |