diff options
author | Tilman Blumenbach | 2015-01-21 01:51:05 +0100 |
---|---|---|
committer | Tilman Blumenbach | 2015-01-21 01:51:05 +0100 |
commit | 2531b41af8d364bc829f94119ccab1948abfdd1b (patch) | |
tree | 4b12f0b7ffa20bd1268e4798339d19939d1b8c41 | |
parent | 61f49de850f56822308193b4189f64b029bd2b72 (diff) | |
download | aur-2531b41af8d364bc829f94119ccab1948abfdd1b.tar.gz |
AMO tool: Ignore beta versions.
-rwxr-xr-x | get_latest_info.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/get_latest_info.py b/get_latest_info.py index 6b0168e188f7..f0323ded539c 100755 --- a/get_latest_info.py +++ b/get_latest_info.py @@ -54,12 +54,16 @@ def get_latest_addon_info(addon_id, os): if os is not None: install_xpath += "[@os='%s']" % os - version = parsed_resp.find("version") - install = parsed_resp.find(install_xpath) + install = None + for elm in parsed_resp.findall(install_xpath): + if elm.get("status") != "Beta": + install = elm + break # XXX: Quick and dirty: If the response does not contain # the version tag, then we fail horribly here. Should be handled # properly. + version = parsed_resp.find("version") return version.text, install.text if install is not None else None |