소스 검색

fix retry pgp

Son NK 5 년 전
부모
커밋
1dc2e9c54f
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/pgp_utils.py

+ 1 - 0
app/pgp_utils.py

@@ -51,6 +51,7 @@ def encrypt_file(data: BytesIO, fingerprint: str) -> str:
             load_public_key(mailbox.pgp_public_key)
 
             LOG.d("retry to encrypt")
+            data.seek(0)
             r = gpg.encrypt_file(data, fingerprint, always_trust=True)
 
         if not r.ok: