fix loop_on_init bug

This commit is contained in:
gary
2024-02-18 09:59:11 +10:00
parent 123b2ca805
commit cd3e190e45

View File

@@ -118,10 +118,10 @@ def main():
log.info("Debug: %s", weewx.debug)
# If no command line --loop-on-init was specified, look in the config file.
if namespace.loop_on_init is None:
if not namespace.loop_on_init:
loop_on_init = to_bool(config_dict.get('loop_on_init', False))
else:
loop_on_init = namespace.loop_on_init
loop_on_init = True
# Save the current working directory. A service might
# change it. In case of a restart, we need to change it back.