diff options
author | kiko%async.com.br <> | 2004-03-17 08:12:25 +0100 |
---|---|---|
committer | kiko%async.com.br <> | 2004-03-17 08:12:25 +0100 |
commit | 1bcd4b67a3ea4468ce3127ca1e9cce4a59690824 (patch) | |
tree | 5c75d8ba3db6e43402184f4bbbcd43d6cf68501a /contrib/bugzilla-submit | |
parent | cf625452006197c765e3833e78798591291630f3 (diff) | |
download | bugzilla-1bcd4b67a3ea4468ce3127ca1e9cce4a59690824.tar.gz bugzilla-1bcd4b67a3ea4468ce3127ca1e9cce4a59690824.tar.xz |
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.
Diffstat (limited to 'contrib/bugzilla-submit')
-rwxr-xr-x | contrib/bugzilla-submit/bugzilla-submit | 5 |
1 files changed, 3 insertions, 2 deletions
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 |