| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 from file_system import FileNotFoundError | 9 from file_system import FileNotFoundError |
| 10 from handlebar_dict_generator import HandlebarDictGenerator | 10 from handlebar_dict_generator import HandlebarDictGenerator |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 idl_path = unix_name + '.idl' | 91 idl_path = unix_name + '.idl' |
| 92 try: | 92 try: |
| 93 return self._GenerateHandlebarContext(key, | 93 return self._GenerateHandlebarContext(key, |
| 94 self._json_cache.GetFromFile(self._base_path + '/' + json_path), | 94 self._json_cache.GetFromFile(self._base_path + '/' + json_path), |
| 95 path) | 95 path) |
| 96 except FileNotFoundError: | 96 except FileNotFoundError: |
| 97 try: | 97 try: |
| 98 return self._GenerateHandlebarContext(key, | 98 return self._GenerateHandlebarContext(key, |
| 99 self._idl_cache.GetFromFile(self._base_path + '/' + idl_path), | 99 self._idl_cache.GetFromFile(self._base_path + '/' + idl_path), |
| 100 path) | 100 path) |
| 101 except FileNotFoundError as e: | 101 except FileNotFoundError: |
| 102 logging.error(e) | |
| 103 raise | 102 raise |
| OLD | NEW |