Commit b7d3b24d authored by maruel@chromium.org's avatar maruel@chromium.org

Increment tries so it doesn't loop forever.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/5257002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@67359 0039d316-1c4b-4281-b951-d872f2087c98
parent d528cb88
......@@ -188,7 +188,7 @@ class AbstractRpcServer(object):
if (not self.host.startswith("http://") and
not self.host.startswith("https://")):
self.host = "http://" + self.host
assert re.match(r'^[a-z]+://[a-z0-9\.-_]+[a-z](|:[0-9]+)$', self.host), (
assert re.match(r'^[a-z]+://[a-z0-9\.-_]+(|:[0-9]+)$', self.host), (
'%s is malformed' % host)
self.host_override = host_override
self.auth_function = auth_function
......@@ -281,6 +281,7 @@ class AbstractRpcServer(object):
tries = 0
url = "%s/_ah/login?%s" % (host, urllib.urlencode(args))
while tries < 3:
tries += 1
req = self._CreateRequest(url)
try:
response = self.opener.open(req)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment