Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: globals/get_browser_versions.py

Issue 29321106: Issue 2723 - Raise a more detailed exception when there is no update for Mozilla products (Closed)
Patch Set: Created June 25, 2015, 1:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: globals/get_browser_versions.py
===================================================================
--- a/globals/get_browser_versions.py
+++ b/globals/get_browser_versions.py
@@ -45,8 +45,10 @@
finally:
response.close()
- update = doc.getElementsByTagName('update')[0]
- full_version = update.getAttribute(attribute)
+ updates = doc.getElementsByTagName('update')
+ if not updates:
+ raise Exception('No updates for %s in %s channel' % (product, channel))
+ full_version = updates[0].getAttribute(attribute)
match = re.search(r'^(\d+)(?:\.\d+)?', full_version)
if minor:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld