From a33faf2827bfc7baea5d83ef1be8fe659a963355 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 28 Dec 2012 11:40:59 -0500 Subject: Add checks to Python scripts for version dependencies. Signed-off-by: Eric S. Raymond Signed-off-by: Junio C Hamano --- contrib/p4import/git-p4import.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib/p4import/git-p4import.py') diff --git a/contrib/p4import/git-p4import.py b/contrib/p4import/git-p4import.py index b6e534b65b..593d6a0682 100644 --- a/contrib/p4import/git-p4import.py +++ b/contrib/p4import/git-p4import.py @@ -14,6 +14,11 @@ import sys import time import getopt +if sys.hexversion < 0x02020000: + # The behavior of the marshal module changed significantly in 2.2 + sys.stderr.write("git-p4import.py: requires Python 2.2 or later.\n") + sys.exit(1) + from signal import signal, \ SIGPIPE, SIGINT, SIG_DFL, \ default_int_handler -- cgit v1.2.3