From 1bcd4b67a3ea4468ce3127ca1e9cce4a59690824 Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" <> Date: Wed, 17 Mar 2004 07:12:25 +0000 Subject: Fix the version-detection code with Fredrik Lundh's test suggested at http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=jVxv4.116%24fsi.186942464%40newsb.telia.net -- this stops bugzilla-submit complaining about vendor versions of Python 2.3. --- contrib/bugzilla-submit/bugzilla-submit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib/bugzilla-submit') diff --git a/contrib/bugzilla-submit/bugzilla-submit b/contrib/bugzilla-submit/bugzilla-submit index 8d40be04b..3e721f41c 100755 --- a/contrib/bugzilla-submit/bugzilla-submit +++ b/contrib/bugzilla-submit/bugzilla-submit @@ -12,14 +12,15 @@ # TODO: use RDF output to pick up valid options, as in # http://www.async.com.br/~kiko/mybugzilla/config.cgi?ctype=rdf -import sys +import sys, string def error(m): sys.stderr.write("bugzilla-submit: %s\n" % m) sys.stderr.flush() sys.exit(1) -if sys.version[:6] < '2.3.0': +version = string.split(string.split(sys.version)[0], ".")[:2] +if map(int, version) < [2, 3]: error("you must upgrade to Python 2.3 or higher to use this script.") import urllib, re, os, netrc, email.Parser, optparse -- cgit v1.2.3-24-g4f1b