summaryrefslogtreecommitdiff
path: root/contrib/ciabot
diff options
context:
space:
mode:
authorLibravatar Eric S. Raymond <esr@thyrsus.com>2012-12-28 11:40:59 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-12-28 11:35:04 -0800
commita33faf2827bfc7baea5d83ef1be8fe659a963355 (patch)
tree30f2ad5df3b32acdf5e84f7b81cfdf23ea42a236 /contrib/ciabot
parentRemove duplicate entry in ./Documentation/Makefile (diff)
downloadtgif-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/ciabot')
-rwxr-xr-xcontrib/ciabot/ciabot.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/ciabot/ciabot.py b/contrib/ciabot/ciabot.py
index bd24395d4c..36b5665ff8 100755
--- a/contrib/ciabot/ciabot.py
+++ b/contrib/ciabot/ciabot.py
@@ -47,7 +47,13 @@
# we default to that.
#
-import os, sys, commands, socket, urllib
+import sys
+if sys.hexversion < 0x02000000:
+ # The limiter is the xml.sax module
+ sys.stderr.write("ciabot.py: requires Python 2.0.0 or later.\n")
+ sys.exit(1)
+
+import os, commands, socket, urllib
from xml.sax.saxutils import escape
# Changeset URL prefix for your repo: when the commit ID is appended