Commit 97451fd4 authored by ale's avatar ale
Browse files

Do not fail encrypt() if the public key is already in our keyring

parent 0184c840
Pipeline #4180 failed with stage
in 1 second
......@@ -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']:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment