From 857c7ac65426907925c89e3c62d3d73455367230 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Tue, 1 Mar 2016 22:39:40 +0000 Subject: [PATCH] #44: Harmonise environment variables with constant names --- src/paperless/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 67f6c4a0c..1599a08e8 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -235,8 +235,10 @@ def deprecated(before, after): ) if not CONVERT_BINARY: - deprecated("PAPERLESS_CONVERT", "PAPERLESS_CONVERT_BINARY") - CONVERT_BINARY = os.getenv("PAPERLESS_CONVERT", "convert") + CONVERT_BINARY = "convert" + if os.getenv("PAPERLESS_CONVERT"): + deprecated("PAPERLESS_CONVERT", "PAPERLESS_CONVERT_BINARY") + CONVERT_BINARY = os.getenv("PAPERLESS_CONVERT", CONVERT_BINARY) if not CONSUMPTION_DIR and os.getenv("PAPERLESS_CONSUME"): deprecated("PAPERLESS_CONSUME", "PAPERLESS_CONSUMPTION_DIR")