summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2020-02-12 14:31:05 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-12 06:00:16 +0000
commit54a4e6007ab8be5738525b440cd6836c613517df (patch)
tree4e13a2ed3775463c0459754452b3888b7bb98b28 /git_config.py
parent42339d7e52d6de6c702b78be7f5014e13646cc1b (diff)
downloadgit-repo-54a4e6007ab8be5738525b440cd6836c613517df.tar.gz
Fix various whitespace issues reported by pyflakes
- E201 whitespace after '[' - E202 whitespace before '}' - E221 multiple spaces before operator - E222 multiple spaces after operator - E225 missing whitespace around operator - E226 missing whitespace around arithmetic operator - E231 missing whitespace after ',' - E261 at least two spaces before inline comment - E271 multiple spaces after keyword Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E201,E202,E221,E222,E225,E226,E231,E261,E271 Change-Id: I367113eb8c847eb460532c7c2f8643f33040308c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254601 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/git_config.py b/git_config.py
index 8311d9f0..8cc52dab 100644
--- a/git_config.py
+++ b/git_config.py
@@ -75,7 +75,7 @@ def _key(name):
75 parts = name.split('.') 75 parts = name.split('.')
76 if len(parts) < 2: 76 if len(parts) < 2:
77 return name.lower() 77 return name.lower()
78 parts[ 0] = parts[ 0].lower() 78 parts[0] = parts[0].lower()
79 parts[-1] = parts[-1].lower() 79 parts[-1] = parts[-1].lower()
80 return '.'.join(parts) 80 return '.'.join(parts)
81 81
@@ -430,7 +430,7 @@ def _open_ssh(host, port=None):
430 430
431 # We will make two calls to ssh; this is the common part of both calls. 431 # We will make two calls to ssh; this is the common part of both calls.
432 command_base = ['ssh', 432 command_base = ['ssh',
433 '-o','ControlPath %s' % ssh_sock(), 433 '-o', 'ControlPath %s' % ssh_sock(),
434 host] 434 host]
435 if port is not None: 435 if port is not None:
436 command_base[1:1] = ['-p', str(port)] 436 command_base[1:1] = ['-p', str(port)]
@@ -439,13 +439,13 @@ def _open_ssh(host, port=None):
439 # ...but before actually starting a master, we'll double-check. This can 439 # ...but before actually starting a master, we'll double-check. This can
440 # be important because we can't tell that that 'git@myhost.com' is the same 440 # be important because we can't tell that that 'git@myhost.com' is the same
441 # as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file. 441 # as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file.
442 check_command = command_base + ['-O','check'] 442 check_command = command_base + ['-O', 'check']
443 try: 443 try:
444 Trace(': %s', ' '.join(check_command)) 444 Trace(': %s', ' '.join(check_command))
445 check_process = subprocess.Popen(check_command, 445 check_process = subprocess.Popen(check_command,
446 stdout=subprocess.PIPE, 446 stdout=subprocess.PIPE,
447 stderr=subprocess.PIPE) 447 stderr=subprocess.PIPE)
448 check_process.communicate() # read output, but ignore it... 448 check_process.communicate() # read output, but ignore it...
449 isnt_running = check_process.wait() 449 isnt_running = check_process.wait()
450 450
451 if not isnt_running: 451 if not isnt_running:
@@ -467,7 +467,7 @@ def _open_ssh(host, port=None):
467 except Exception as e: 467 except Exception as e:
468 _ssh_master = False 468 _ssh_master = False
469 print('\nwarn: cannot enable ssh control master for %s:%s\n%s' 469 print('\nwarn: cannot enable ssh control master for %s:%s\n%s'
470 % (host,port, str(e)), file=sys.stderr) 470 % (host, port, str(e)), file=sys.stderr)
471 return False 471 return False
472 472
473 time.sleep(1) 473 time.sleep(1)