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

Unified Diff: chrome/common/extensions/docs/server2/availability_finder.py

Issue 736773002: Docserver: Add commit history and _reset_commit servlet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup, test for commit reset Created 5 years, 11 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
Index: chrome/common/extensions/docs/server2/availability_finder.py
diff --git a/chrome/common/extensions/docs/server2/availability_finder.py b/chrome/common/extensions/docs/server2/availability_finder.py
index 69ecf356583cbb39e24a43e2b97d90952287c7bd..bc470f5ee8415853c72a0d0133aacc2024e4e50a 100644
--- a/chrome/common/extensions/docs/server2/availability_finder.py
+++ b/chrome/common/extensions/docs/server2/availability_finder.py
@@ -174,7 +174,7 @@ class AvailabilityFinder(object):
schema_fs = self._CreateAPISchemaFileSystem(file_system)
api_schemas = schema_fs.GetFromFile(api_filename).Get()
matching_schemas = [api for api in api_schemas
- if api['namespace'] == api_name]
+ if api and api['namespace'] == api_name]
# There should only be a single matching schema per file, or zero in the
# case of no API data being found in _EXTENSION_API.
assert len(matching_schemas) <= 1

Powered by Google App Engine
This is Rietveld 408576698