Implement better GPG output decoding
This commit is contained in:
parent
8dd7b5ad84
commit
2e3cb7aa64
1 changed files with 5 additions and 1 deletions
|
@ -160,7 +160,11 @@ def process_keyrings():
|
|||
stdout=subprocess.PIPE)
|
||||
fpr = None
|
||||
for line in proc.stdout.readlines():
|
||||
fpr = process_gpg_list_keys_line(line.decode('utf8'), fpr)
|
||||
try:
|
||||
line = line.decode('utf8')
|
||||
except UnicodeDecodeError:
|
||||
line = line.decode('iso8859-1')
|
||||
fpr = process_gpg_list_keys_line(line, fpr)
|
||||
retcode = proc.wait()
|
||||
if retcode != 0:
|
||||
logging.error("subprocess ended with return code %d", retcode)
|
||||
|
|
Loading…
Reference in a new issue