From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 52417138CD0 for ; Sun, 31 May 2015 05:03:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C587BE08CE; Sun, 31 May 2015 05:03:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5780CE08C4 for ; Sun, 31 May 2015 05:03:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 944F5340C3C for ; Sun, 31 May 2015 05:03:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EF974A19 for ; Sun, 31 May 2015 05:03:18 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1433027930.c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/actions.py gkeys/gkeys/lib.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37 X-VCS-Branch: master Date: Sun, 31 May 2015 05:03:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 92cd65e6-4a22-4a18-834d-8739a047f2ad X-Archives-Hash: 87546d50977a172681a0dcb9c5c871ca commit: c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37 Author: Brian Dolbec gentoo org> AuthorDate: Wed Mar 18 20:49:18 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat May 30 23:18:50 2015 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=c05d6a6e gkeys: Fix list-key action to list all keys found in the keydir unless -f is passed in This now ignores the keys listed in the db's seed file and lists all keys seen by gpg. Except when -f, --fingerprint is an argument, then it lists only that key. gkeys/gkeys/actions.py | 5 ++++- gkeys/gkeys/lib.py | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index 22d660f..6975c38 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -237,7 +237,10 @@ class Actions(object): kwargs = handler.build_gkeydict(args) keyresults = seeds.list(**kwargs) for key in sorted(keyresults): - result = self.gpg.list_keys(key.keydir, key.fingerprint) + if args.fingerprint: + result = self.gpg.list_keys(key.keydir, kwargs['fingerprint']) + else: + result = self.gpg.list_keys(key.keydir) ls, lr = self._list_it(key, result.output) success.append(ls) results[key.name] = lr diff --git a/gkeys/gkeys/lib.py b/gkeys/gkeys/lib.py index a740dd9..bce4e55 100644 --- a/gkeys/gkeys/lib.py +++ b/gkeys/gkeys/lib.py @@ -254,16 +254,17 @@ class GkeysGPG(GPG): if fingerprint: task = 'list-key' target = fingerprint + self.set_keydir(keydir, task, fingerprint=True) else: task = 'list-keys' - target = keydir - self.set_keydir(keydir, task, fingerprint=True) - self.config.options['tasks'][task].extend(['--keyid-format', 'long', '--fingerprint', '--fingerprint']) + target = '' + self.set_keydir(keydir, task, fingerprint=False) + self.config.options['tasks'][task].extend(['--keyid-format', 'long', '--fingerprint']) if colons: task_value = ['--with-colons'] self.config.options['tasks'][task].extend(task_value) self.logger.debug("** Calling runGPG with Running 'gpg %s --%s %s'" - % (' '.join(self.config['tasks'][task]), task, keydir) + % (' '.join(self.config['tasks'][task]), task, target) ) result = self.runGPG(task=task, inputfile=target) self.logger.info('GPG return code: ' + str(result.returncode))