Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/report/report.py

Issue 1677943002: report.format_html now ignores APIs not passed to it. (Closed) Base URL: https://github.com/chromium/caterpillar.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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: src/report/report.py
diff --git a/src/report/report.py b/src/report/report.py
index ba7cb8313590afb94b79dab4f18b7f7feacc525b..9ca14985bc26e4db597d336a169eac17a2925297 100644
--- a/src/report/report.py
+++ b/src/report/report.py
@@ -268,6 +268,10 @@ def format_html(string, apis):
# standalone API (chrome.superapi.api) and we can just take the top-level
# status of the API.
api = match_group
+
+ if api not in apis:
+ return match.group(0)
+
status = apis[api]['status']
return '<span class="ca-feature {}">{}</span>'.format(
status, match.group(0))
@@ -275,6 +279,9 @@ def format_html(string, apis):
api, member = chrome_app.apis.CHROME_API_AND_MEMBER_REGEX.match(
match.group(0)).groups()
+ if api not in apis:
+ return match.group(0)
+
status = None
while True:
# Check if the member has a status; if it does, use that, otherwise jump
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698