A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Clean up some linter complaints
Daniel Quinncccc9e1a2468
diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.pyindex 41e5382d5..6f731372f 100644--- a/src/documents/management/commands/document_consumer.py+++ b/src/documents/management/commands/document_consumer.py@@ -1,7 +1,5 @@-import datetimeimport loggingimport os-import sysimport timefrom django.conf import settings@@ -13,7 +11,7 @@ from ...mail import MailFetcher, MailFetcherErrortry:from inotify_simple import INotify, flagsexcept ImportError:- pass+ INotify = flags = Noneclass Command(BaseCommand):@@ -62,7 +60,8 @@ class Command(BaseCommand):parser.add_argument("--no-inotify",action="store_true",- help="Don't use inotify, even if it's available."+ help="Don't use inotify, even if it's available.",+ default=False)def handle(self, *args, **options):@@ -71,8 +70,7 @@ class Command(BaseCommand):directory = options["directory"]loop_time = options["loop_time"]mail_delta = options["mail_delta"] * 60- use_inotify = (not options["no_inotify"]- and "inotify_simple" in sys.modules)+ use_inotify = INotify is not None and options["no_inotify"] is Falsetry:self.file_consumer = Consumer(consume=directory)