summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2020-02-12 14:58:39 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-12 06:36:22 +0000
commitabdf7500612f1d115863ba8f026ddbea1e5a1f28 (patch)
tree2b87f056bdf4fb53a170fc9121c2f5d1557bb48f /main.py
parent0ab95ba6d010abe5d615fa070e404582aca1d90a (diff)
downloadgit-repo-abdf7500612f1d115863ba8f026ddbea1e5a1f28.tar.gz
Fix indentation issues reported by flake8
- E121 continuation line under-indented for hanging indent - E122 continuation line missing indentation or outdented - E125 continuation line with same indent as next logical line - E126 continuation line over-indented for hanging indent - E127 continuation line over-indented for visual indent - E128 continuation line under-indented for visual indent - E129 visually indented line with same indent as next logical line - E131 continuation line unaligned for hanging indent Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E121,E122,E125,E126,E127,E128,E129,E131 Change-Id: Ifd95fb8e6a1a4d6e9de187b5787d64a6326dd249 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254605 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.py b/main.py
index 7dbdbfa5..7724a765 100755
--- a/main.py
+++ b/main.py
@@ -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