From fed7f7ab896113f821a6aabc879aac6d5a0f2416 Mon Sep 17 00:00:00 2001 From: Viktor Stanchev Date: Sun, 3 Jan 2016 17:42:26 -0500 Subject: [PATCH] error out if the version of python is old --- pirate/pirate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pirate/pirate.py b/pirate/pirate.py index 32400a1..f3be04e 100755 --- a/pirate/pirate.py +++ b/pirate/pirate.py @@ -1,3 +1,9 @@ +import sys +from distutils.version import LooseVersion +if LooseVersion(sys.version) < LooseVersion("3.4.0"): + print("Python 3.4.0 required") + sys.exit(1) + import re import os import argparse @@ -6,7 +12,6 @@ import configparser import socket import urllib.request as request import urllib.error -import sys import builtins from collections import OrderedDict