From 85dbc20a80a2b4c233708be1460da7909e205388 Mon Sep 17 00:00:00 2001 From: Christopher Baklid Date: Fri, 25 May 2018 14:21:10 +0200 Subject: lint --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config.py') diff --git a/config.py b/config.py index cb428fe..f6ae0f7 100644 --- a/config.py +++ b/config.py @@ -1,5 +1,6 @@ import os + def attempt_automatically_finding_the_ip_of_rmq(): try: import docker @@ -7,9 +8,10 @@ def attempt_automatically_finding_the_ip_of_rmq(): containers = client.containers.get('snekbox_pdrmq_1') HOST = list(containers.attrs.get('NetworkSettings').get('Networks').values())[0]['IPAddress'] return HOST - except: + except Exception: return '172.17.0.2' + USERNAME = 'guest' PASSWORD = 'guest' HOST = os.environ.get('RMQ_HOST', attempt_automatically_finding_the_ip_of_rmq()) -- cgit v1.2.3