Check python version before running darcsweb.
Wed Jan 24 23:38:07 UTC 2007 Alberto Bertogli <albertito@gmail.com>
* Check python version before running darcsweb.
This patch adds a check to verify that the python version is >= 2.3, so the
user doesn't get strange errors when using older python interpreters.
Thanks to Mark Stosberg for the suggestion.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2013-07-18 20:17:41.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2013-07-18 20:17:41.000000000 +0000
@@ -2365,6 +2365,10 @@
# main
#
+if sys.version_info < (2, 3):
+ print "Sorry, but Python 2.3 or above is required to run darcsweb."
+ sys.exit(1)
+
form = cgi.FieldStorage()
# if they don't specify a repo, print the list and exit