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

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

Issue 13896007: Devserver: run the cron over the examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again to avoid .svn Created 7 years, 8 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 | « chrome/common/extensions/docs/server2/subversion_file_system.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/template_data_source.py
diff --git a/chrome/common/extensions/docs/server2/template_data_source.py b/chrome/common/extensions/docs/server2/template_data_source.py
index 288620a8c8f4083f2b7dafe9bf20d4bf915142cd..e7c86b36afc10d3bb509975d92ca554a75cd632b 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import logging
+import os
from branch_utility import BranchUtility
from docs_server_utils import FormatKey
@@ -114,7 +115,7 @@ class TemplateDataSource(object):
"""
template = self.GetTemplate(self._public_template_path, template_name)
if not template:
- return ''
+ return None
# TODO error handling
render_data = template.render({
'api_list': self._api_list_data_source,
@@ -143,10 +144,9 @@ class TemplateDataSource(object):
return self.GetTemplate(self._private_template_path, key)
def GetTemplate(self, base_path, template_name):
- real_path = FormatKey(template_name)
try:
- return self._cache.GetFromFile(base_path + '/' + real_path)
+ return self._cache.GetFromFile(
+ '/'.join((base_path, FormatKey(template_name))))
except FileNotFoundError as e:
- logging.warning('Template %s in %s not found: %s' % (
- template_name, base_path, e))
+ logging.error(e)
return None
« no previous file with comments | « chrome/common/extensions/docs/server2/subversion_file_system.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698