summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTilman Blumenbach2015-01-21 01:51:05 +0100
committerTilman Blumenbach2015-01-21 01:51:05 +0100
commit2531b41af8d364bc829f94119ccab1948abfdd1b (patch)
tree4b12f0b7ffa20bd1268e4798339d19939d1b8c41
parent61f49de850f56822308193b4189f64b029bd2b72 (diff)
downloadaur-2531b41af8d364bc829f94119ccab1948abfdd1b.tar.gz
AMO tool: Ignore beta versions.
-rwxr-xr-xget_latest_info.py8
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