Index: tools/grit/grit/gather/policy_json.py |
diff --git a/tools/grit/grit/gather/policy_json.py b/tools/grit/grit/gather/policy_json.py |
index c4545088b6ec06362e9a754289cf719f2d17d717..308fe0d9384501c5ca4934bf03216bb971dc66cc 100644 |
--- a/tools/grit/grit/gather/policy_json.py |
+++ b/tools/grit/grit/gather/policy_json.py |
@@ -147,11 +147,13 @@ class PolicyJson(skeleton_gatherer.SkeletonGatherer): |
'caption': 'Caption', |
'label': 'Label', |
} |
- if type == 'policy': |
+ if item_type == 'policy': |
return '%s of the policy named %s' % (key_map[key], item['name']) |
- elif type == 'enum_item': |
+ elif item_type == 'enum_item': |
return ('%s of the option named %s in policy %s' % |
(key_map[key], item['name'], parent_item['name'])) |
+ else: |
+ raise Exception('Unexpected type %s' % item_type) |
def _AddPolicyKey(self, item, item_type, parent_item, key, depth): |
'''Given a policy/enumeration item and a key, adds that key and its value |