mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fixes the decryption command not working.
This commit is contained in:
parent
ece94379d8
commit
7f933d373f
@ -2,7 +2,6 @@ import os
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.management.base import BaseCommand, CommandError
|
from django.core.management.base import BaseCommand, CommandError
|
||||||
from termcolor import colored as coloured
|
|
||||||
|
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from paperless.db import GnuPG
|
from paperless.db import GnuPG
|
||||||
@ -26,16 +25,14 @@ class Command(BaseCommand):
|
|||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print(coloured(
|
print(
|
||||||
"\n\nWARNING: This script is going to work directly on your "
|
"\n\nWARNING: This script is going to work directly on your "
|
||||||
"document originals, so\nWARNING: you probably shouldn't run "
|
"document originals, so\nWARNING: you probably shouldn't run "
|
||||||
"this unless you've got a recent backup\nWARNING: handy. It "
|
"this unless you've got a recent backup\nWARNING: handy. It "
|
||||||
"*should* work without a hitch, but be safe and backup your\n"
|
"*should* work without a hitch, but be safe and backup your\n"
|
||||||
"WARNING: stuff first.\n\nHit Ctrl+C to exit now, or Enter to "
|
"WARNING: stuff first.\n\nHit Ctrl+C to exit now, or Enter to "
|
||||||
"continue.\n\n",
|
"continue.\n\n"
|
||||||
"yellow",
|
)
|
||||||
attrs=("bold",)
|
|
||||||
))
|
|
||||||
__ = input()
|
__ = input()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
return
|
return
|
||||||
@ -57,8 +54,8 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
for document in encrypted_files:
|
for document in encrypted_files:
|
||||||
|
|
||||||
print(coloured("Decrypting {}".format(
|
print("Decrypting {}".format(
|
||||||
document).encode('utf-8'), "green"))
|
document).encode('utf-8'))
|
||||||
|
|
||||||
old_paths = [document.source_path, document.thumbnail_path]
|
old_paths = [document.source_path, document.thumbnail_path]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user