New flake8/pyflakes 0.6+ fix
"line" redefined in list comprehension. and PEP8 indent fixes
This commit is contained in:
parent
f17fc00fc8
commit
4e7e4a988a
1 changed files with 16 additions and 12 deletions
|
|
@ -119,7 +119,8 @@ class WeboobRepos(ReplApplication):
|
||||||
for keyfile in os.listdir(os.path.join(source_path, r.KEYDIR)):
|
for keyfile in os.listdir(os.path.join(source_path, r.KEYDIR)):
|
||||||
print 'Adding key %s' % keyfile
|
print 'Adding key %s' % keyfile
|
||||||
keypath = os.path.join(source_path, r.KEYDIR, keyfile)
|
keypath = os.path.join(source_path, r.KEYDIR, keyfile)
|
||||||
subprocess.check_call([gpg,
|
subprocess.check_call([
|
||||||
|
gpg,
|
||||||
'--quiet',
|
'--quiet',
|
||||||
'--no-default-keyring',
|
'--no-default-keyring',
|
||||||
'--keyring', os.path.realpath(krname),
|
'--keyring', os.path.realpath(krname),
|
||||||
|
|
@ -158,19 +159,21 @@ class WeboobRepos(ReplApplication):
|
||||||
|
|
||||||
if r.signed:
|
if r.signed:
|
||||||
# Find out which keys are allowed to sign
|
# Find out which keys are allowed to sign
|
||||||
fingerprints = [line.strip(':').split(':')[-1]
|
fingerprints = [gpgline.strip(':').split(':')[-1]
|
||||||
for line
|
for gpgline
|
||||||
in subprocess.Popen([gpg,
|
in subprocess.Popen([
|
||||||
'--with-fingerprint', '--with-colons',
|
gpg,
|
||||||
'--list-public-keys',
|
'--with-fingerprint', '--with-colons',
|
||||||
'--no-default-keyring',
|
'--list-public-keys',
|
||||||
'--keyring', os.path.realpath(krname)],
|
'--no-default-keyring',
|
||||||
stdout=subprocess.PIPE).communicate()[0].splitlines()
|
'--keyring', os.path.realpath(krname)],
|
||||||
if line.startswith('fpr:')]
|
stdout=subprocess.PIPE).communicate()[0].splitlines()
|
||||||
|
if gpgline.startswith('fpr:')]
|
||||||
# Find out the first secret key we have that is allowed to sign
|
# Find out the first secret key we have that is allowed to sign
|
||||||
secret_fingerprint = None
|
secret_fingerprint = None
|
||||||
for fingerprint in fingerprints:
|
for fingerprint in fingerprints:
|
||||||
proc = subprocess.Popen([gpg,
|
proc = subprocess.Popen([
|
||||||
|
gpg,
|
||||||
'--list-secret-keys', fingerprint],
|
'--list-secret-keys', fingerprint],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
|
|
@ -193,7 +196,8 @@ class WeboobRepos(ReplApplication):
|
||||||
print 'Signing %s' % filename
|
print 'Signing %s' % filename
|
||||||
if os.path.exists(sigpath):
|
if os.path.exists(sigpath):
|
||||||
os.remove(sigpath)
|
os.remove(sigpath)
|
||||||
subprocess.check_call([gpg,
|
subprocess.check_call([
|
||||||
|
gpg,
|
||||||
'--quiet',
|
'--quiet',
|
||||||
'--local-user', secret_fingerprint,
|
'--local-user', secret_fingerprint,
|
||||||
'--detach-sign',
|
'--detach-sign',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue