mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Chore: switch from os.path to pathlib.Path (#9060)
This commit is contained in:

committed by
GitHub

parent
aaaa6c1393
commit
76d363f22d
@@ -1,8 +1,8 @@
|
||||
import abc
|
||||
import os
|
||||
from email import message_from_bytes
|
||||
from email import policy
|
||||
from email.message import Message
|
||||
from pathlib import Path
|
||||
|
||||
from django.conf import settings
|
||||
from gnupg import GPG
|
||||
@@ -50,7 +50,7 @@ class MailMessageDecryptor(MailMessagePreprocessor, LoggingMixin):
|
||||
return False
|
||||
if settings.EMAIL_GNUPG_HOME is None:
|
||||
return True
|
||||
return os.path.isdir(settings.EMAIL_GNUPG_HOME)
|
||||
return Path(settings.EMAIL_GNUPG_HOME).is_dir()
|
||||
|
||||
def run(self, message: MailMessage) -> MailMessage:
|
||||
if not hasattr(message, "obj"):
|
||||
|
Reference in New Issue
Block a user