diff options
author | 2015-03-18 13:49:18 -0700 | |
---|---|---|
committer | 2015-05-30 16:18:50 -0700 | |
commit | c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37 (patch) | |
tree | 9024382514037ed1ae97683324206b2f88d7518b /gkeys/gkeys/lib.py | |
parent | gkeys/lib.py: Fix logger message to show the correct function (diff) | |
download | gentoo-keys-c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37.tar.gz gentoo-keys-c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37.tar.bz2 gentoo-keys-c05d6a6e622d14a6dc9d3b72b34e7d040efe7a37.zip |
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.
Diffstat (limited to 'gkeys/gkeys/lib.py')
-rw-r--r-- | gkeys/gkeys/lib.py | 9 |
1 files changed, 5 insertions, 4 deletions
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)) |