monkeysign fails when signing previously signed key
When attempting to sign a previously signed key, monkeysign fails to sign and does not recover. Stacktrace:
Traceback (most recent call last):
File "./msign", line 358, in watch_out_callback
self.msui.sign_key()
File "/home/simonft/monkeysign/ui.py", line 279, in sign_key
if not self.tmpkeyring.sign_key(pattern, alluids):
File "/home/simonft/monkeysign/gpg.py", line 415, in sign_key
self.context.seek(proc.stderr, 'GET_BOOL sign_uid.okay')
File "/home/simonft/monkeysign/gpg.py", line 210, in seek
return self.seek_pattern(fd, '^\[GNUPG:\] ' + pattern)
File "/home/simonft/monkeysign/gpg.py", line 203, in seek_pattern
raise GpgProcotolError(self.returncode, "could not find pattern '%s' in input" % pattern)
gpg.GpgProcotolError: [Errno 0] could not find pattern '^\[GNUPG:\] GET_BOOL sign_uid.okay' in input
This is because seek is looking for "GET_BOOL sign_uid.okay", however it actully recieves:
[GNUPG:] IMPORT_OK 0 C8CFA98704BD1CE2C035C56DB2FAB24D4DC0D21D
[GNUPG:] ALREADY_SIGNED B2FAB24D4DC0D21D
It should be modified to see if a key has already been signed, and show a message if so.
Also GpgProcotolError
should be GpgProtocolError
.
(from redmine: created on 2013-03-16)