diff options
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -188,7 +188,7 @@ class _Repo(object): | |||
188 | copts = cmd.ReadEnvironmentOptions(copts) | 188 | copts = cmd.ReadEnvironmentOptions(copts) |
189 | except NoManifestException as e: | 189 | except NoManifestException as e: |
190 | print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)), | 190 | print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)), |
191 | file=sys.stderr) | 191 | file=sys.stderr) |
192 | print('error: manifest missing or unreadable -- please run init', | 192 | print('error: manifest missing or unreadable -- please run init', |
193 | file=sys.stderr) | 193 | file=sys.stderr) |
194 | return 1 | 194 | return 1 |
@@ -211,9 +211,9 @@ class _Repo(object): | |||
211 | cmd.ValidateOptions(copts, cargs) | 211 | cmd.ValidateOptions(copts, cargs) |
212 | result = cmd.Execute(copts, cargs) | 212 | result = cmd.Execute(copts, cargs) |
213 | except (DownloadError, ManifestInvalidRevisionError, | 213 | except (DownloadError, ManifestInvalidRevisionError, |
214 | NoManifestException) as e: | 214 | NoManifestException) as e: |
215 | print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)), | 215 | print('error: in `%s`: %s' % (' '.join([name] + argv), str(e)), |
216 | file=sys.stderr) | 216 | file=sys.stderr) |
217 | if isinstance(e, NoManifestException): | 217 | if isinstance(e, NoManifestException): |
218 | print('error: manifest missing or unreadable -- please run init', | 218 | print('error: manifest missing or unreadable -- please run init', |
219 | file=sys.stderr) | 219 | file=sys.stderr) |
@@ -346,7 +346,7 @@ class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): | |||
346 | def http_error_401(self, req, fp, code, msg, headers): | 346 | def http_error_401(self, req, fp, code, msg, headers): |
347 | _AddPasswordFromUserInput(self, msg, req) | 347 | _AddPasswordFromUserInput(self, msg, req) |
348 | return urllib.request.HTTPBasicAuthHandler.http_error_401( | 348 | return urllib.request.HTTPBasicAuthHandler.http_error_401( |
349 | self, req, fp, code, msg, headers) | 349 | self, req, fp, code, msg, headers) |
350 | 350 | ||
351 | def http_error_auth_reqed(self, authreq, host, req, headers): | 351 | def http_error_auth_reqed(self, authreq, host, req, headers): |
352 | try: | 352 | try: |
@@ -356,7 +356,7 @@ class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): | |||
356 | old_add_header(name, val) | 356 | old_add_header(name, val) |
357 | req.add_header = _add_header | 357 | req.add_header = _add_header |
358 | return urllib.request.AbstractBasicAuthHandler.http_error_auth_reqed( | 358 | return urllib.request.AbstractBasicAuthHandler.http_error_auth_reqed( |
359 | self, authreq, host, req, headers) | 359 | self, authreq, host, req, headers) |
360 | except: | 360 | except: |
361 | reset = getattr(self, 'reset_retry_count', None) | 361 | reset = getattr(self, 'reset_retry_count', None) |
362 | if reset is not None: | 362 | if reset is not None: |
@@ -369,7 +369,7 @@ class _DigestAuthHandler(urllib.request.HTTPDigestAuthHandler): | |||
369 | def http_error_401(self, req, fp, code, msg, headers): | 369 | def http_error_401(self, req, fp, code, msg, headers): |
370 | _AddPasswordFromUserInput(self, msg, req) | 370 | _AddPasswordFromUserInput(self, msg, req) |
371 | return urllib.request.HTTPDigestAuthHandler.http_error_401( | 371 | return urllib.request.HTTPDigestAuthHandler.http_error_401( |
372 | self, req, fp, code, msg, headers) | 372 | self, req, fp, code, msg, headers) |
373 | 373 | ||
374 | def http_error_auth_reqed(self, auth_header, host, req, headers): | 374 | def http_error_auth_reqed(self, auth_header, host, req, headers): |
375 | try: | 375 | try: |
@@ -379,7 +379,7 @@ class _DigestAuthHandler(urllib.request.HTTPDigestAuthHandler): | |||
379 | old_add_header(name, val) | 379 | old_add_header(name, val) |
380 | req.add_header = _add_header | 380 | req.add_header = _add_header |
381 | return urllib.request.AbstractDigestAuthHandler.http_error_auth_reqed( | 381 | return urllib.request.AbstractDigestAuthHandler.http_error_auth_reqed( |
382 | self, auth_header, host, req, headers) | 382 | self, auth_header, host, req, headers) |
383 | except: | 383 | except: |
384 | reset = getattr(self, 'reset_retry_count', None) | 384 | reset = getattr(self, 'reset_retry_count', None) |
385 | if reset is not None: | 385 | if reset is not None: |
@@ -406,7 +406,7 @@ class _KerberosAuthHandler(urllib.request.BaseHandler): | |||
406 | 406 | ||
407 | if self.retried > 3: | 407 | if self.retried > 3: |
408 | raise urllib.request.HTTPError(req.get_full_url(), 401, | 408 | raise urllib.request.HTTPError(req.get_full_url(), 401, |
409 | "Negotiate auth failed", headers, None) | 409 | "Negotiate auth failed", headers, None) |
410 | else: | 410 | else: |
411 | self.retried += 1 | 411 | self.retried += 1 |
412 | 412 | ||