diff --git a/GnuPG/__init__.py b/GnuPG/__init__.py index cde18a2..abe50e7 100644 --- a/GnuPG/__init__.py +++ b/GnuPG/__init__.py @@ -8,6 +8,8 @@ def public_keys( keyhome ): keys = list() for line in p.stdout.readlines(): if line[0:3] == 'uid' or line[0:3] == 'pub': + if ('<' not in line or '>' not in line): + continue key = line.split('<')[1].split('>')[0] if keys.count(key) == 0: keys.append(key)