changeset 19441:8b312c080adb

gpg: treat "ERRSIG" as a valid key id but no fingerprint
author Wei, Elson <elson.wei@gmail.com>
date Fri, 12 Jul 2013 10:05:11 +0800
parents 4a0d0616c47d
children 33c72f054e16
files hgext/gpg.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/gpg.py	Thu Jul 11 13:11:41 2013 -0400
+++ b/hgext/gpg.py	Fri Jul 12 10:05:11 2013 +0800
@@ -55,12 +55,13 @@
             if not l.startswith("[GNUPG:]"):
                 continue
             l = l[9:]
-            if l.startswith("ERRSIG"):
-                err = _("error while verifying signature")
-                break
-            elif l.startswith("VALIDSIG"):
+            if l.startswith("VALIDSIG"):
                 # fingerprint of the primary key
                 fingerprint = l.split()[10]
+            elif l.startswith("ERRSIG"):
+                key = l.split(" ", 3)[:2]
+                key.append("")
+                fingerprint = None
             elif (l.startswith("GOODSIG") or
                   l.startswith("EXPSIG") or
                   l.startswith("EXPKEYSIG") or