aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
authorGravatar Christopher Goes <[email protected]>2019-03-19 18:48:33 -0600
committerGravatar Christopher Goes <[email protected]>2019-03-19 18:48:33 -0600
commit42f9140c413aba70b62c085f1d1f6b5356a684a0 (patch)
tree0221f692f7db4da6b66c8f96682e5eff01c77c71 /config.py
parentAdd flake8-docstrings to Pipenv (diff)
Add docstrings
Diffstat (limited to 'config.py')
-rw-r--r--config.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/config.py b/config.py
index 846ad4a..10218eb 100644
--- a/config.py
+++ b/config.py
@@ -1,10 +1,10 @@
import os
import docker
from docker.errors import NotFound
-# import traceback
def autodiscover():
+ """Search for the snekbox container and return it's IPv4 address."""
container_names = ["rmq", "pdrmq", "snekbox_pdrmq_1"]
client = docker.from_env()
@@ -15,13 +15,10 @@ def autodiscover():
host = list(container.attrs.get('NetworkSettings').get('Networks').values())
host = host[0]['IPAddress']
return host
-
except NotFound:
continue
-
except Exception:
pass
- # print(traceback.format_exc())
return '127.0.0.1'