Reduces number of warnings from testing from 165 to 128. In doing so, fixes a few minor things in the decrypt and export commands

This commit is contained in:
Trenton Holmes
2022-03-07 16:13:20 -08:00
parent 96a84d16a6
commit 85b210ebf6
6 changed files with 24 additions and 14 deletions

View File

@@ -59,8 +59,10 @@ class Command(BaseCommand):
old_paths = [document.source_path, document.thumbnail_path]
raw_document = GnuPG.decrypted(document.source_file, passphrase)
raw_thumb = GnuPG.decrypted(document.thumbnail_file, passphrase)
with document.source_file as file_handle:
raw_document = GnuPG.decrypted(file_handle, passphrase)
with document.thumbnail_file as file_handle:
raw_thumb = GnuPG.decrypted(file_handle, passphrase)
document.storage_type = Document.STORAGE_TYPE_UNENCRYPTED