From: Ansgar Burchardt Date: Thu, 20 Sep 2012 11:14:29 +0000 (+0200) Subject: daklib/command.py: strip whitespace from fingerprint X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b6bf371b00f8fa09385d86cee449363d2bf6268b;p=dak.git daklib/command.py: strip whitespace from fingerprint This allows copying the fingerprint from the gpg output without any editing. --- 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)