aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.flake8 (renamed from tox.ini)2
-rw-r--r--config.py3
-rw-r--r--snekbox.py5
3 files changed, 7 insertions, 3 deletions
diff --git a/tox.ini b/.flake8
index 88ac396..ee465ff 100644
--- a/tox.ini
+++ b/.flake8
@@ -1,5 +1,5 @@
[flake8]
-max-line-length=120
+max-line-length=100
application_import_names=snekbox
ignore=P102,B311,W503,E226,S311
exclude=__pycache__, venv, .venv, tests
diff --git a/config.py b/config.py
index 455c79e..846ad4a 100644
--- a/config.py
+++ b/config.py
@@ -12,7 +12,8 @@ def autodiscover():
try:
container = client.containers.get(name)
if container.status == "running":
- host = list(container.attrs.get('NetworkSettings').get('Networks').values())[0]['IPAddress']
+ host = list(container.attrs.get('NetworkSettings').get('Networks').values())
+ host = host[0]['IPAddress']
return host
except NotFound:
diff --git a/snekbox.py b/snekbox.py
index ddde563..37d7993 100644
--- a/snekbox.py
+++ b/snekbox.py
@@ -17,7 +17,10 @@ class Snekbox(object):
self.nsjail_workaround()
env = {
- 'PATH': '/snekbox/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ 'PATH': (
+ '/snekbox/.venv/bin:/usr/local/bin:/usr/local/'
+ 'sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
+ ),
'LANG': 'en_US.UTF-8',
'PYTHON_VERSION': '3.6.5',
'PYTHON_PIP_VERSION': '10.0.1',