| Index: chrome/common/extensions/docs/server2/table_of_contents_renderer.py
|
| diff --git a/chrome/common/extensions/docs/server2/table_of_contents_renderer.py b/chrome/common/extensions/docs/server2/table_of_contents_renderer.py
|
| index 71c94a061e65d34b048b1fe3afb1c8441e3ab19e..38580f09173c381c2aabf9731cc0ae48b482a5ac 100644
|
| --- a/chrome/common/extensions/docs/server2/table_of_contents_renderer.py
|
| +++ b/chrome/common/extensions/docs/server2/table_of_contents_renderer.py
|
| @@ -3,6 +3,7 @@
|
| # found in the LICENSE file.
|
|
|
| from extensions_paths import PRIVATE_TEMPLATES
|
| +from file_system import FileNotFoundError
|
|
|
|
|
| class TableOfContentsRenderer(object):
|
| @@ -20,8 +21,11 @@ class TableOfContentsRenderer(object):
|
| '''Renders a list of DocumentSections |sections| and returns a tuple
|
| (text, warnings).
|
| '''
|
| - table_of_contents_template = self._templates.GetFromFile(
|
| - '%s/table_of_contents.html' % PRIVATE_TEMPLATES).Get()
|
| + path = '%s/table_of_contents.html' % PRIVATE_TEMPLATES
|
| + try:
|
| + table_of_contents_template = self._templates.GetFromFile(path).Get()
|
| + except FileNotFoundError:
|
| + return '', ['%s not found' % path]
|
|
|
| def make_toc_items(entries):
|
| return [{
|
|
|