changeset 87:928654373755

change default flow style for yaml, http://pyyaml.org/wiki/PyYAMLDocumentation
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 27 Apr 2012 14:13:04 -0700
parents 6067ae61cd17
children 36cf1d9bf40b
files configuration/configuration.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configuration/configuration.py	Fri Apr 27 13:57:21 2012 -0700
+++ b/configuration/configuration.py	Fri Apr 27 14:13:04 2012 -0700
@@ -88,13 +88,14 @@
 if yaml:
     class YAML(ConfigurationProvider):
         extensions = ['yml', 'yaml']
+        dump_args = {'default_flow_style': False}
         def read(self, filename):
             f = file(filename)
             config = yaml.load(f)
             f.close()
             return config
         def _write(self, fp, config):
-            fp.write(yaml.dump(config))
+            fp.write(yaml.dump(config, **self.dump_args))
             # TODO: could use templates to get order down, etc
 
     configuration_providers.append(YAML())