code style fixes

This commit is contained in:
Jonas Winkler
2020-11-12 21:09:45 +01:00
parent 4477154c12
commit eb6805e37e
31 changed files with 110 additions and 149 deletions

View File

@@ -25,6 +25,7 @@ elif os.path.exists("/usr/local/etc/paperless.conf"):
# Tesseract process to one thread.
os.environ['OMP_THREAD_LIMIT'] = "1"
def __get_boolean(key, default="NO"):
"""
Return a boolean value based on whatever the user has supplied in the
@@ -32,9 +33,11 @@ def __get_boolean(key, default="NO"):
"""
return bool(os.getenv(key, default).lower() in ("yes", "y", "1", "t", "true"))
# NEVER RUN WITH DEBUG IN PRODUCTION.
DEBUG = __get_boolean("PAPERLESS_DEBUG", "NO")
###############################################################################
# Directories #
###############################################################################