# HG changeset patch # User Wei, Elson # Date 2013-07-12 02:10:46 # Node ID 33c72f054e168f0b23188f39888fbf04969e9f21 # Parent 8b312c080adbfae4f6d21810cb92ea2094756c71 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 @@ class gpg(object): 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 @@ class gpg(object): 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 @@ def getkeys(ui, repo, mygpg, sigdata, co 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