Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
pgp-mime-lib
Commits
97451fd4
Commit
97451fd4
authored
Aug 22, 2019
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fail encrypt() if the public key is already in our keyring
parent
0184c840
Pipeline
#4180
failed with stage
in 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pgp_mime_lib/__init__.py
pgp_mime_lib/__init__.py
+3
-1
No files found.
pgp_mime_lib/__init__.py
View file @
97451fd4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment