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))