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 handlebar_dict_generator import HandlebarDictGenerator | 9 from handlebar_dict_generator import HandlebarDictGenerator |
10 import third_party.json_schema_compiler.json_comment_eater as json_comment_eater | 10 import third_party.json_schema_compiler.json_comment_eater as json_comment_eater |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 idl_path = unix_name + '.idl' | 64 idl_path = unix_name + '.idl' |
65 try: | 65 try: |
66 return self._AddPermissionsDict(self._json_cache.GetFromFile( | 66 return self._AddPermissionsDict(self._json_cache.GetFromFile( |
67 self._base_path + '/' + json_path), path) | 67 self._base_path + '/' + json_path), path) |
68 except Exception: | 68 except Exception: |
69 try: | 69 try: |
70 return self._AddPermissionsDict(self._idl_cache.GetFromFile( | 70 return self._AddPermissionsDict(self._idl_cache.GetFromFile( |
71 self._base_path + '/' + idl_path), path) | 71 self._base_path + '/' + idl_path), path) |
72 except Exception as e: | 72 except Exception as e: |
73 logging.warn(e) | 73 logging.warn(e) |
74 return None | 74 raise |
OLD | NEW |