From 5670e61a310a1644870edc3fc867316856804f66 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 24 Oct 2016 14:26:07 -0700 Subject: [PATCH] add version check for Python 3.4- --- mitmproxy/tools/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mitmproxy/tools/main.py b/mitmproxy/tools/main.py index 9fce92349..3bb0cd1e3 100644 --- a/mitmproxy/tools/main.py +++ b/mitmproxy/tools/main.py @@ -1,7 +1,13 @@ +from __future__ import print_function # this is here for the version check to work on Python 2. import os import signal import sys +if sys.version_info < (3, 5): + print("#" * 49, file=sys.stderr) + print("# mitmproxy only supports Python 3.5 and above! #", file=sys.stderr) + print("#" * 49, file=sys.stderr) + from mitmproxy.tools import cmdline from mitmproxy import exceptions from mitmproxy.proxy import config