From 6c16cbb5904119222d5663f05d7c61dc82615819 Mon Sep 17 00:00:00 2001 From: Blallo Date: Thu, 8 Aug 2019 15:28:10 +0200 Subject: [PATCH] Fix bind address if passed via command line. --- api/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/app.py b/api/app.py index 19787c0..7db7e18 100644 --- a/api/app.py +++ b/api/app.py @@ -74,9 +74,11 @@ def run( app.add_routes(routes) addr = [] if address is not None: - addr.append(address) - if conf["http"].get("bind_addr"): + addr = [address] + elif conf["http"].get("bind_addr"): addr.extend(conf["http"]["bind_addr"]) + else: + addr = ["127.0.0.1"] if port is None: port = conf["http"]["port"] alog.debug("Starting app with: addr -> %s, port -> %d", addr, port)