Commit 1bcd4b67 authored by kiko%async.com.br's avatar kiko%async.com.br

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.
parent cf625452
...@@ -12,14 +12,15 @@ ...@@ -12,14 +12,15 @@
# TODO: use RDF output to pick up valid options, as in # TODO: use RDF output to pick up valid options, as in
# http://www.async.com.br/~kiko/mybugzilla/config.cgi?ctype=rdf # http://www.async.com.br/~kiko/mybugzilla/config.cgi?ctype=rdf
import sys import sys, string
def error(m): def error(m):
sys.stderr.write("bugzilla-submit: %s\n" % m) sys.stderr.write("bugzilla-submit: %s\n" % m)
sys.stderr.flush() sys.stderr.flush()
sys.exit(1) 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.") error("you must upgrade to Python 2.3 or higher to use this script.")
import urllib, re, os, netrc, email.Parser, optparse import urllib, re, os, netrc, email.Parser, optparse
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment