From 80642aca05bfd81f1964e6da967d28b938ad327c Mon Sep 17 00:00:00 2001 From: marcsello Date: Mon, 26 Apr 2021 00:02:51 +0200 Subject: [PATCH] Fixed config loading --- single_ursim_control/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/single_ursim_control/config.py b/single_ursim_control/config.py index 4b78878..a082c75 100644 --- a/single_ursim_control/config.py +++ b/single_ursim_control/config.py @@ -10,8 +10,8 @@ class Config: SYNC_TIMEOUT = os.environ.get("SYNC_TIMEOUT", None) # Wait infinity by default ROBOT_ADDRESS = os.environ.get("ROBOT_ADDRESS") PROGRAM_URL = os.environ["PROGRAM_URL"] - DRY_RUN = ('--dry-run' in sys.argv) or bool(os.environ.get("DRY_RUN", False)) - DEBUG = ('--debug' in sys.argv) or bool(os.environ.get("DEBUG", False)) + DRY_RUN = ('--dry-run' in sys.argv) or bool(os.environ.get("DRY_RUN", "").upper() in ['YES', 'TRUE', '1']) + DEBUG = ('--debug' in sys.argv) or bool(os.environ.get("DEBUG", "").upper() in ['YES', 'TRUE', '1']) HTTP_ENABLE = ('--no-http' not in sys.argv) and \ bool(os.environ.get("HTTP_ENABLE", "").upper() not in ['NO', 'FALSE', '0']) HTTP_PORT = int(os.environ.get("HTTP_PORT", 8080))