try encrypt again if fail
This commit is contained in:
parent
e5b60d9251
commit
c8cd066d25
|
@ -24,6 +24,9 @@ def load_public_key(public_key: str) -> str:
|
||||||
|
|
||||||
|
|
||||||
def encrypt_file(data: BytesIO, fingerprint: str) -> str:
|
def encrypt_file(data: BytesIO, fingerprint: str) -> str:
|
||||||
|
r = gpg.encrypt_file(data, fingerprint, always_trust=True)
|
||||||
|
if not r.ok:
|
||||||
|
LOG.error("Try encrypt again %s", fingerprint)
|
||||||
r = gpg.encrypt_file(data, fingerprint, always_trust=True)
|
r = gpg.encrypt_file(data, fingerprint, always_trust=True)
|
||||||
if not r.ok:
|
if not r.ok:
|
||||||
# save the content for debugging
|
# save the content for debugging
|
||||||
|
|
Loading…
Reference in a new issue