aboutsummaryrefslogtreecommitdiff
path: root/grit/format/policy_templates/writers/reg_writer.py
diff options
context:
space:
mode:
Diffstat (limited to 'grit/format/policy_templates/writers/reg_writer.py')
-rw-r--r--grit/format/policy_templates/writers/reg_writer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/grit/format/policy_templates/writers/reg_writer.py b/grit/format/policy_templates/writers/reg_writer.py
index dcb70f4..ad83046 100644
--- a/grit/format/policy_templates/writers/reg_writer.py
+++ b/grit/format/policy_templates/writers/reg_writer.py
@@ -83,9 +83,10 @@ class RegWriter(template_writer.TemplateWriter):
list.append('"%s"=%s' % (policy['name'], example_value_str))
def WritePolicy(self, policy):
- self._WritePolicy(policy,
- self.config['win_reg_mandatory_key_name'],
- self._mandatory)
+ if self.CanBeMandatory(policy):
+ self._WritePolicy(policy,
+ self.config['win_reg_mandatory_key_name'],
+ self._mandatory)
def WriteRecommendedPolicy(self, policy):
self._WritePolicy(policy,