gpg: getkeys() removes unused returning value "err"
authorWei, Elson <elson.wei@gmail.com>
Fri, 12 Jul 2013 10:10:46 +0800
changeset 19442 33c72f054e16
parent 19441 8b312c080adb
child 19443 2a7fd31ac548
gpg: getkeys() removes unused returning value "err"
hgext/gpg.py
--- a/hgext/gpg.py	Fri Jul 12 10:05:11 2013 +0800
+++ b/hgext/gpg.py	Fri Jul 12 10:10:46 2013 +0800
@@ -48,7 +48,6 @@
                     pass
         keys = []
         key, fingerprint = None, None
-        err = ""
         for l in ret.splitlines():
             # see DETAILS in the gnupg documentation
             # filter the logger output
@@ -70,11 +69,9 @@
                     keys.append(key + [fingerprint])
                 key = l.split(" ", 2)
                 fingerprint = None
-        if err:
-            return err, []
         if key is not None:
             keys.append(key + [fingerprint])
-        return err, keys
+        return keys
 
 def newgpg(ui, **opts):
     """create a new gpg instance"""
@@ -120,10 +117,7 @@
 
     data = node2txt(repo, node, version)
     sig = binascii.a2b_base64(sig)
-    err, keys = mygpg.verify(data, sig)
-    if err:
-        ui.warn("%s:%d %s\n" % (fn, ln , err))
-        return None
+    keys = mygpg.verify(data, sig)
 
     validkeys = []
     # warn for expired key and/or sigs