From c3d2f2b76f1f34703106031bdbcb6c34df81686c Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 22 Mar 2012 14:09:22 -0700 Subject: [PATCH] Ignore /clone.bundle on HTTP 401, 403 and 404 401: Unauthorized, authentication may be required. This is usually handled internally by the HTTP client in Python. If it reaches our code in repo, the Python HTTP client didn't find a password in ~/.netrc that it could use. 403: Authentication was supplied, but is incorrect. It might be that the CDN doesn't want to offer this clone.bundle file to the client, but the Git fetch operation would still be successful. This might arise if branch level read controls were used in Gerrit Code Review and the /clone.bundle file contained branches not visible to the client. 404: The server has no /clone.bundle file available. In all of these cases, sliently ignore the /clone.bundle file HTTP error and let the Git operation take over. Change-Id: I1787f3cac86b017351952bbb793fe5874d83c72b --- project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.py b/project.py index b80ad319..946a6ac3 100644 --- a/project.py +++ b/project.py @@ -1516,7 +1516,7 @@ class Project(object): except: return None - if e.code == 404: + if e.code in (401, 403, 404): keep = False return False elif _content_type() == 'text/plain':