From 702c020e58dd8663e66c25f88fba2a02264e7357 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 20 Dec 2016 01:37:50 +0100 Subject: Fix check for bind_address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The empty string is a valid setting for the bind_address option, so explicitly check for None here instead. Signed-off-by: Johannes Löthberg --- synapse/app/media_repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/app/media_repository.py') diff --git a/synapse/app/media_repository.py b/synapse/app/media_repository.py index c121107245..a47283e520 100644 --- a/synapse/app/media_repository.py +++ b/synapse/app/media_repository.py @@ -107,7 +107,7 @@ class MediaRepositoryServer(HomeServer): root_resource = create_resource_tree(resources, Resource()) - if bind_address: + if bind_address is not None: bind_addresses.append(bind_address) for address in bind_addresses: @@ -132,7 +132,7 @@ class MediaRepositoryServer(HomeServer): bind_address = listener.get("bind_address", None) bind_addresses = listener.get("bind_addresses", []) - if bind_address: + if bind_address is not None: bind_addresses.append(bind_address) for address in bind_addresses: -- cgit 1.4.1