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

Unified Diff: tools/grit/grit/gather/policy_json.py

Issue 6312006: Fix generating descriptions of policy template strings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/tools/grit/grit/gather
Patch Set: rebase Created 9 years, 11 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 | « no previous file | tools/grit/grit/gather/policy_json_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | tools/grit/grit/gather/policy_json_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698