diff options
author | 2011-01-15 03:17:00 +0530 | |
---|---|---|
committer | 2011-01-15 03:35:05 +0530 | |
commit | 1b33e3726e0351796f69860ff116b2465ae298bc (patch) | |
tree | 4d9690c6a84ab87ed14e6b4169a3cd684932e4d5 | |
parent | package_module: add special-case package names (diff) | |
download | gentoo-bumpchecker-1b33e3726e0351796f69860ff116b2465ae298bc.tar.gz gentoo-bumpchecker-1b33e3726e0351796f69860ff116b2465ae298bc.tar.bz2 gentoo-bumpchecker-1b33e3726e0351796f69860ff116b2465ae298bc.zip |
gnome_module: fix fetching of GNOME 3.0 version lists
-rw-r--r-- | modules/gnome_module.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/gnome_module.py b/modules/gnome_module.py index 6556eef..b81d0fe 100644 --- a/modules/gnome_module.py +++ b/modules/gnome_module.py @@ -1,5 +1,6 @@ # Copyright John N. Laliberte <allanonjl@gentoo.org> # LICENSE - GPL2 +# vim: set sts=4 sw=4 et tw=0 : # gnome module import urllib2, package_module, simple_cache_module @@ -10,6 +11,11 @@ import clioptions_module DEBUG = False class GNOME: + def _isgnome3(self, gnome_release_list): + if int(gnome_release_list[0]) == 2 and int(gnome_release_list[1]) > 90: + return True + return False + def __init__(self, nextrev=False): options = clioptions_module.Options() args = options.get_arguments() @@ -21,7 +27,9 @@ class GNOME: # gnome_release is the major release number the development is leading up to or is part of. E.g, 2.21.5 will turn to 2.22 and 2.22.2 becomes 2.22 # This is used in latest versions list fetching URL construction gnome_release_list = args.release_number.split(".") - if int(gnome_release_list[1]) % 2 != 0: + if self._isgnome3(gnome_release_list): + gnome_release_list = ['3', '0'] + elif int(gnome_release_list[1]) % 2 != 0: gnome_release_list[1] = str(int(gnome_release_list[1]) + 1) self.gnome_release = ".".join(gnome_release_list[:2]) |