[PATCH 2 of 4 V4] gpg: getkeys() removes unused returning value "err"

elson.wei at gmail.com elson.wei at gmail.com
Thu Jul 11 21:20:38 CDT 2013


# HG changeset patch
# User Wei, Elson <elson.wei at gmail.com>
# Date 1373595046 -28800
#      Fri Jul 12 10:10:46 2013 +0800
# Node ID 750bda4b332c3eb913750f26f496b988042da25f
# Parent  1b573beed7a3f34705d11007e5f183a51b6a0c33
gpg: getkeys() removes unused returning value "err"

diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-07-12_10-07-15_r19380+.diff
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130712/95760d5c/attachment.bin>


More information about the Mercurial-devel mailing list