Skip to content
Snippets Groups Projects
Commit b42129b3 authored by Antoine Beaupré's avatar Antoine Beaupré
Browse files

try to skip weird out of place gnupg message to sign zack's key

parent 5a8d1291
Branches
Tags
No related merge requests found
......@@ -460,6 +460,15 @@ class Keyring():
except GpgProtocolError as e:
if 'sign_uid.okay' in str(e):
multiuid = False
elif '[GNUPG:]' not in str(e):
# this is not a protocol message, try again but skipping now
# this was necessary in order to sign Zack's key, as it was spewing:
# gpg: moving a key signature to the correct place
# instead of a [GNUGPG:] message
try:
multiuid = self.context.seek(proc.stderr, 'GET_BOOL keyedit.sign_all.okay')
except GpgProtocolError as e:
raise GpgRuntimeError(self.context.returncode, _('cannot sign: %s') % re.sub(r'^.*found "(.*)', r'\1', str(e)).decode('utf-8'))
else:
raise GpgRuntimeError(self.context.returncode, _('cannot sign: %s') % re.sub(r'^.*found "(.*)', r'\1', str(e)).decode('utf-8'))
if multiuid:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment