]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix the version-detection code with Fredrik Lundh's test suggested at
authorkiko%async.com.br <>
Wed, 17 Mar 2004 07:12:25 +0000 (07:12 +0000)
committerkiko%async.com.br <>
Wed, 17 Mar 2004 07:12:25 +0000 (07:12 +0000)
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

index 8d40be04b3abe24fe2e1843a6b51fd38a0724811..3e721f41cca26189e655f6c372ff53dd5dd62cc4 100755 (executable)
 # 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