Fix bind address if passed via command line.

This commit is contained in:
sfigato 2019-08-08 15:28:10 +02:00 committed by blallo
parent 9ecea804c9
commit 6c16cbb590
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

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