addressing review comments

This commit is contained in:
Arul
2023-02-21 06:53:01 +05:30
parent fa79547f9b
commit d3fe3940f9

View File

@@ -263,7 +263,10 @@ if __name__ == '__main__':
config = None
try:
with open(os.path.join(CONFIG_PATH, "config.json")) as config_file:
config = json.loads(Template(config_file.read()).safe_substitute(ENV_VARS))
if len(ENV_VARS) != 0:
config = json.loads(Template(config_file.read()).safe_substitute(ENV_VARS))
else:
config = json.loads(config_file.read())
except:
print("😡 Error reading config.json")
# wait 10 seconds to prevent excessive logging on docker auto restart
@@ -313,4 +316,4 @@ if __name__ == '__main__':
print("❓ Unrecognized parameter '" +
sys.argv[1] + "'. Stopping now.")
else:
updateIPs(getIPs())
updateIPs(getIPs())