aboutsummaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-12-28 11:40:59 -0500
committerJunio C Hamano <gitster@pobox.com>2012-12-28 11:35:04 -0800
commita33faf2827bfc7baea5d83ef1be8fe659a963355 (patch)
tree30f2ad5df3b32acdf5e84f7b81cfdf23ea42a236 /contrib/fast-import
parent18499ba694711c02a5bc729b7f8e362dd760b10a (diff)
downloadgit-a33faf2827bfc7baea5d83ef1be8fe659a963355.tar.gz
git-a33faf2827bfc7baea5d83ef1be8fe659a963355.tar.xz
Add checks to Python scripts for version dependencies.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/import-zips.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
index 82f5ed3dd..5cec9b012 100755
--- a/contrib/fast-import/import-zips.py
+++ b/contrib/fast-import/import-zips.py
@@ -9,10 +9,15 @@
## git log --stat import-zips
from os import popen, path
-from sys import argv, exit
+from sys import argv, exit, hexversion, stderr
from time import mktime
from zipfile import ZipFile
+if hexversion < 0x01060000:
+ # The limiter is the zipfile module
+ sys.stderr.write("import-zips.py: requires Python 1.6.0 or later.\n")
+ sys.exit(1)
+
if len(argv) < 2:
print 'Usage:', argv[0], '<zipfile>...'
exit(1)