Index: tools/grit/grit/format/policy_templates/writers/json_writer.py |
diff --git a/tools/grit/grit/format/policy_templates/writers/json_writer.py b/tools/grit/grit/format/policy_templates/writers/json_writer.py |
index 776e4f5a739e09e0d767ec32697c43a6a7f029fc..69a5e795b683e18afe997c1851c4165c25f8720d 100644 |
--- a/tools/grit/grit/format/policy_templates/writers/json_writer.py |
+++ b/tools/grit/grit/format/policy_templates/writers/json_writer.py |
@@ -36,7 +36,9 @@ class JsonWriter(template_writer.TemplateWriter): |
example_value_str = 'true' |
else: |
example_value_str = 'false' |
- elif policy['type'] == 'enum': |
+ elif policy['type'] == 'string-enum': |
+ example_value_str = '"%s"' % example_value; |
+ elif policy['type'] == 'int-enum': |
example_value_str = example_value |
gfeher
2011/01/03 10:30:10
Please make int-to-string conversion explicit.
danno
2011/01/07 12:24:25
Done.
|
else: |
raise Exception('unknown policy type %s:' % policy['type']) |