From 0f96eb180ed0fd30300de4985cec374dfadffde3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 4 Oct 2016 14:33:50 +0200 Subject: [PATCH] add Python2 compatible version check --- gallery_dl/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 6e5ae0a8..009cabd4 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -6,6 +6,8 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. +from __future__ import unicode_literals, print_function + __author__ = "Mike Fährmann" __copyright__ = "Copyright 2014-2016 Mike Fährmann" @@ -14,8 +16,13 @@ __version__ = "0.5.2" __maintainer__ = "Mike Fährmann" __email__ = "mike_faehrmann@web.de" -import os import sys + +if sys.hexversion < 0x3030000: + print("Python 3.3+ required", file=sys.stderr) + sys.exit(1) + +import os import argparse import json from . import config, extractor, job, exception