aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 14:23:36 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 14:23:36 +0200
commite77f07a36bc2e29552bb541ed71406aa5127d4ac (patch)
tree980a41195850f57dcc34a0e73645e59b88dd261d
parentae7e9efb5ca014291e879694414bbffc982f2a0d (diff)
downloadmitmproxy-e77f07a36bc2e29552bb541ed71406aa5127d4ac.tar.gz
mitmproxy-e77f07a36bc2e29552bb541ed71406aa5127d4ac.tar.bz2
mitmproxy-e77f07a36bc2e29552bb541ed71406aa5127d4ac.zip
cleanup
-rw-r--r--mitmproxy/tools/main.py4
-rw-r--r--test/conftest.py2
-rw-r--r--test/mitmproxy/test_connections.py1
3 files changed, 3 insertions, 4 deletions
diff --git a/mitmproxy/tools/main.py b/mitmproxy/tools/main.py
index 568c5177..84dab1fe 100644
--- a/mitmproxy/tools/main.py
+++ b/mitmproxy/tools/main.py
@@ -1,6 +1,8 @@
from __future__ import print_function # this is here for the version check to work on Python 2.
import sys
+# This must be at the very top, before importing anything else that might break!
+# Keep all other imports below with the 'noqa' magic comment.
if sys.version_info < (3, 5):
print("#" * 49, file=sys.stderr)
print("# mitmproxy only supports Python 3.5 and above! #", file=sys.stderr)
@@ -13,7 +15,7 @@ from mitmproxy.tools import cmdline # noqa
from mitmproxy import exceptions # noqa
from mitmproxy import options # noqa
from mitmproxy import optmanager # noqa
-from mitmproxy import proxy
+from mitmproxy import proxy # noqa
from mitmproxy.utils import version_check # noqa
from mitmproxy.utils import debug # noqa
diff --git a/test/conftest.py b/test/conftest.py
index 50b38197..bb913548 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -1,8 +1,6 @@
import os
import pytest
import OpenSSL
-import functools
-from contextlib import contextmanager
import mitmproxy.net.tcp
diff --git a/test/mitmproxy/test_connections.py b/test/mitmproxy/test_connections.py
index daf4c79e..99367bb6 100644
--- a/test/mitmproxy/test_connections.py
+++ b/test/mitmproxy/test_connections.py
@@ -1,5 +1,4 @@
import socket
-import os
import threading
import ssl
import OpenSSL