aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkiko%async.com.br <>2004-03-17 07:12:25 +0000
committerkiko%async.com.br <>2004-03-17 07:12:25 +0000
commit1bcd4b67a3ea4468ce3127ca1e9cce4a59690824 (patch)
tree5c75d8ba3db6e43402184f4bbbcd43d6cf68501a /contrib
parentFix for bug 236424: Allow showdependencies trees to collapse. Adds (diff)
downloadbugzilla-1bcd4b67a3ea4468ce3127ca1e9cce4a59690824.tar.gz
bugzilla-1bcd4b67a3ea4468ce3127ca1e9cce4a59690824.tar.bz2
bugzilla-1bcd4b67a3ea4468ce3127ca1e9cce4a59690824.zip
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')
-rwxr-xr-xcontrib/bugzilla-submit/bugzilla-submit5
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