aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'config.py')
-rw-r--r--config.py4
1 files changed, 3 insertions, 1 deletions
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())