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

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

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up Created 8 years, 5 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/server_instance.py
diff --git a/chrome/common/extensions/docs/server2/server_instance.py b/chrome/common/extensions/docs/server2/server_instance.py
index d0623f3c4c9b9aa22034c72986dd8066ba7e74dd..e046ab996e9d7c0fa0f7039821e16cc00742cdbd 100644
--- a/chrome/common/extensions/docs/server2/server_instance.py
+++ b/chrome/common/extensions/docs/server2/server_instance.py
@@ -23,21 +23,21 @@ class ServerInstance(object):
"""Fetch a resource in the 'static' directory.
"""
try:
- result = self._cache.getFromFile(STATIC_DIR_PREFIX + '/' + path)
+ result = self._cache.GetFromFile(STATIC_DIR_PREFIX + '/' + path)
base, ext = os.path.splitext(path)
request_handler.response.headers['content-type'] = (
mimetypes.types_map[ext])
return result
- except:
+ except Exception:
return ''
def Get(self, path, request_handler):
if fnmatch(path, 'examples/*.zip'):
- content = self._example_zipper.create(path[:-4])
+ content = self._example_zipper.Create(path[:-4])
request_handler.response.headers['content-type'] = (
mimetypes.types_map['.zip'])
elif path.startswith('examples/'):
- content = self._cache.getFromFile(DOCS_PREFIX + '/' + path)
+ content = self._cache.GetFromFile(DOCS_PREFIX + '/' + path)
request_handler.response.headers['content-type'] = 'text/plain'
elif path.startswith('static/'):
content = self._FetchStaticResource(path, request_handler)

Powered by Google App Engine
This is Rietveld 408576698