summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-12-28 16:40:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-28 19:35:04 (GMT)
commita33faf2827bfc7baea5d83ef1be8fe659a963355 (patch)
tree30f2ad5df3b32acdf5e84f7b81cfdf23ea42a236 /git-p4.py
parent18499ba694711c02a5bc729b7f8e362dd760b10a (diff)
downloadgit-a33faf2827bfc7baea5d83ef1be8fe659a963355.zip
git-a33faf2827bfc7baea5d83ef1be8fe659a963355.tar.gz
git-a33faf2827bfc7baea5d83ef1be8fe659a963355.tar.bz2
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 'git-p4.py')
-rwxr-xr-xgit-p4.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 551aec9..69f1452 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -8,7 +8,13 @@
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
-import optparse, sys, os, marshal, subprocess, shelve
+import sys
+if sys.hexversion < 0x02040000:
+ # The limiter is the subprocess module
+ sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
+ sys.exit(1)
+
+import optparse, os, marshal, subprocess, shelve
import tempfile, getopt, os.path, time, platform
import re, shutil