mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
repo: Fix warnings reported by flake8
repo:342:5: E306 expected 1 blank line before a nested definition, found 0 repo:617:5: F841 local variable 'ret' is assigned to but never used Change-Id: I364fdb5dac8ebaff398b848935fe8356cb9ed2d3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255035 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
This commit is contained in:
parent
6fb0cb5c80
commit
c19cc5c508
8
repo
8
repo
@ -339,10 +339,12 @@ def run_command(cmd, **kwargs):
|
||||
(cmd[0], ret.returncode), file=sys.stderr)
|
||||
print(' cwd: %s\n cmd: %r' %
|
||||
(kwargs.get('cwd', os.getcwd()), cmd), file=sys.stderr)
|
||||
|
||||
def _print_output(name, output):
|
||||
if output:
|
||||
print(' %s:\n >> %s' % (name, '\n >> '.join(output.splitlines())),
|
||||
file=sys.stderr)
|
||||
|
||||
_print_output('stdout', ret.stdout)
|
||||
_print_output('stderr', ret.stderr)
|
||||
raise RunError(ret)
|
||||
@ -614,9 +616,9 @@ def SetupGnuPG(quiet):
|
||||
|
||||
cmd = ['gpg', '--import']
|
||||
try:
|
||||
ret = run_command(cmd, env=env, stdin=subprocess.PIPE,
|
||||
capture_output=quiet,
|
||||
input=MAINTAINER_KEYS.encode('utf-8'))
|
||||
run_command(cmd, env=env, stdin=subprocess.PIPE,
|
||||
capture_output=quiet,
|
||||
input=MAINTAINER_KEYS.encode('utf-8'))
|
||||
except OSError:
|
||||
if not quiet:
|
||||
print('warning: gpg (GnuPG) is not available.', file=sys.stderr)
|
||||
|
Loading…
Reference in New Issue
Block a user