From b6bf371b00f8fa09385d86cee449363d2bf6268b Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 20 Sep 2012 13:14:29 +0200 Subject: [PATCH] daklib/command.py: strip whitespace from fingerprint This allows copying the fingerprint from the gpg output without any editing. --- daklib/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daklib/command.py b/daklib/command.py index 88f65558..cbaffa8f 100644 --- a/daklib/command.py +++ b/daklib/command.py @@ -191,7 +191,8 @@ class CommandFile(object): acl_name = cnf.get('Command::DM::ACL', 'dm') acl = session.query(ACL).filter_by(name=acl_name).one() - fpr = session.query(Fingerprint).filter_by(fingerprint=section['Fingerprint']).one() + fpr_hash = section['Fingerprint'].translate(None, ' ') + fpr = session.query(Fingerprint).filter_by(fingerprint=fpr_hash).one() if fpr.keyring is None or fpr.keyring.keyring_name not in cnf.value_list('Command::DM::Keyrings'): raise CommandError('Key {0} is not in DM keyring.'.format(fpr.fingerprint)) addresses = gpg_get_key_addresses(fpr.fingerprint) -- 2.39.5