mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-22 13:24:22 +00:00
fixup: remove helper fn 'make_dirs'
This commit is contained in:
1 parent
3e8038577d
commit
bccac5017c
2 files changed
+4
-11
No files matched your search
@@ -48,7 +48,7 @@ class Consumer:
|
||||
self.consume = consume
|
||||
self.scratch = scratch
|
||||
|
||||
make_dirs(self.scratch)
|
||||
os.makedirs(self.scratch, exists_ok=True)
|
||||
|
||||
if not self.consume:
|
||||
raise ConsumerError(
|
||||
@@ -247,11 +247,3 @@ class Consumer:
|
||||
with open(doc, "rb") as f:
|
||||
checksum = hashlib.md5(f.read()).hexdigest()
|
||||
return Document.objects.filter(checksum=checksum).exists()
|
||||
|
||||
|
||||
def make_dirs(*dirs):
|
||||
for dir in dirs:
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
except FileExistsError:
|
||||
pass
|
||||
Reference in new issue
Block a user