...
 
Commits (2)
......@@ -214,7 +214,7 @@ def _default_gpghome():
def _default_gpgbinary():
return os.getenv('GNUPG')
return os.getenv('GNUPG', 'gpg')
@contextlib.contextmanager
......@@ -262,7 +262,9 @@ def _import_one_key(gpg, public_key):
fp = None
for res in import_result.results:
if "Entirely new key" not in res["text"]:
# "Not actually changed" in those cases, such as testing,
# where the public key is already in our keyring.
if ('Entirely new key' not in res['text']) and ('Not actually changed' not in res['text']):
raise Error('no valid keys found in input: %r' % res['text'])
if not res['fingerprint']:
continue
......