From d6aaa9f243b0c9f4a5fea2469f719752aa698018 Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Fri, 6 Sep 2013 21:57:49 +0200 Subject: [PATCH] Fixed #1 GnuPG2.x listed keys are now properly interpreted. --- GnuPG/__init__.py | 2 ++ 1 file changed, 2 insertions(+) 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)