diff options
author | 2015-04-20 10:44:59 -0700 | |
---|---|---|
committer | 2015-05-30 16:29:06 -0700 | |
commit | 35ecad248a81436dcad7e6b9928ed3eeb098c9af (patch) | |
tree | 7c1b33415913b4252173b011219c1da4cbfe5f4b | |
parent | gkeys-ldap: Remove keyid/longkeyid from ldap search info (diff) | |
download | gentoo-keys-35ecad248a81436dcad7e6b9928ed3eeb098c9af.tar.gz gentoo-keys-35ecad248a81436dcad7e6b9928ed3eeb098c9af.tar.bz2 gentoo-keys-35ecad248a81436dcad7e6b9928ed3eeb098c9af.zip |
gkeys/seed.py: Replace codecs usage with unicode()
Add a noop for an empty kwargs[key].
jgjhgj
-rw-r--r-- | gkeys/gkeys/seed.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gkeys/gkeys/seed.py b/gkeys/gkeys/seed.py index 985f6a1..01ca5a5 100644 --- a/gkeys/gkeys/seed.py +++ b/gkeys/gkeys/seed.py @@ -36,7 +36,7 @@ if sys.version_info[0] >= 3: return text else: def decoder(text, enc='utf_8'): - return codecs.decode(text, enc) + return unicode(text) class Seeds(object): @@ -155,6 +155,8 @@ class Seeds(object): keys = kwargs result = self.seeds for key in keys: + if not kwargs[key]: + continue if key in ['fingerprint', 'keys', 'keyid']: kwargs[key] = [x.replace(' ', '').upper() for x in kwargs[key]] if key in ['fingerprint', 'keys', 'uid']: |