aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-03-25 09:41:47 +1000
committerGravatar GitHub <[email protected]>2019-03-25 09:41:47 +1000
commit5bdf06c2fc86f8d8ab1ead63c30e856d9fead0cd (patch)
treeb71e0889a4ea6ed8d22852b9805bd13a60994f00 /config.py
parentMerge pull request #11 from python-discord/add-flake8-extensions (diff)
parentMore formatting fixes (diff)
Merge pull request #10 from python-discord/flake8-updates
Flake8 Docstrings Co-authored-by: S. Co1 <[email protected]>
Diffstat (limited to 'config.py')
-rw-r--r--config.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.py b/config.py
index 138c25c..5e4f648 100644
--- a/config.py
+++ b/config.py
@@ -5,6 +5,8 @@ from docker.errors import NotFound
def autodiscover():
+ """Search for the snekbox container and return its IPv4 address."""
+
container_names = ["rmq", "pdrmq", "snekbox_pdrmq_1"]
client = docker.from_env()
@@ -15,13 +17,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'