Index: tools/grit/grit/format/policy_templates/writers/template_writer.py |
diff --git a/tools/grit/grit/format/policy_templates/writers/template_writer.py b/tools/grit/grit/format/policy_templates/writers/template_writer.py |
index 8b742d56a686f33b4917301380357a0330391533..19a71fd80aac67383cddac1ae5022ce1f587c90c 100644 |
--- a/tools/grit/grit/format/policy_templates/writers/template_writer.py |
+++ b/tools/grit/grit/format/policy_templates/writers/template_writer.py |
@@ -11,7 +11,7 @@ class TemplateWriter(object): |
The methods of this class will be called by PolicyTemplateGenerator. |
''' |
- def __init__(self, platforms, config, messages): |
+ def __init__(self, platforms, config): |
'''Initializes a TemplateWriter object. |
Args: |
@@ -31,7 +31,6 @@ class TemplateWriter(object): |
''' |
self.platforms = platforms |
self.config = config |
- self.messages = messages |
def IsPolicySupported(self, policy): |
'''Checks if the given policy is supported by the writer. |
@@ -88,9 +87,10 @@ class TemplateWriter(object): |
Returns: |
Generated output for the passed template definition. |
''' |
+ self.messages = template['messages'] |
self.Init() |
self.BeginTemplate() |
- for policy in template: |
+ for policy in template['policy_definitions']: |
if policy['type'] == 'group': |
child_policies = self._GetPoliciesForWriter(policy) |
if child_policies: |