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>
This commit is contained in:
Eric S. Raymond
2012-12-28 11:40:59 -05:00
committed by Junio C Hamano
parent 18499ba694
commit a33faf2827
8 changed files with 44 additions and 3 deletions

View File

@ -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