diff options
author | Pascal Bach <pascal.bach@siemens.com> | 2015-02-13 16:23:12 +0100 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2015-03-11 07:43:40 +0000 |
commit | 2338788050bfacb64ebb23381b9874a9a7fde60c (patch) | |
tree | a6ed81974dcc6236d96198a95868d566d2ca15f7 | |
parent | 936183a492373f8a54b6ecaa806e252d08b793c5 (diff) | |
download | git-repo-2338788050bfacb64ebb23381b9874a9a7fde60c.tar.gz |
Don't exit with error on HTTP 401 when downloading clone bundle
If the server returns HTTP 401 (unauthorized) when attempting to
download clone bundle files, ignore it and continue, rather than
exiting with a fatal error.
Change-Id: I2c7ee03e149c354c7e4ad6ea1ebf266534778fe1
-rwxr-xr-x | repo | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -462,7 +462,7 @@ def _DownloadBundle(url, local, quiet): | |||
462 | try: | 462 | try: |
463 | r = urllib.request.urlopen(url) | 463 | r = urllib.request.urlopen(url) |
464 | except urllib.error.HTTPError as e: | 464 | except urllib.error.HTTPError as e: |
465 | if e.code in [403, 404]: | 465 | if e.code in [401, 403, 404]: |
466 | return False | 466 | return False |
467 | _print('fatal: Cannot get %s' % url, file=sys.stderr) | 467 | _print('fatal: Cannot get %s' % url, file=sys.stderr) |
468 | _print('fatal: HTTP error %s' % e.code, file=sys.stderr) | 468 | _print('fatal: HTTP error %s' % e.code, file=sys.stderr) |