]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Write config.yaml directly to file.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 15 Jun 2011 18:50:32 +0000 (11:50 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 15 Jun 2011 18:50:32 +0000 (11:50 -0700)
teuthology/task/ceph.py

index c0ea86196fa5452653b635f8a4b9f8b8359ffca1..544cc7f817a0243b6229fd2572f1147e078099da 100644 (file)
@@ -526,8 +526,7 @@ def task(ctx, config):
                 f.write(sha1 + '\n')
 
             with file(os.path.join(ctx.archive, 'config.yaml'), 'w') as f:
-                config = yaml.safe_dump(ctx.config, default_flow_style=False).splitlines()
-                f.write('\n'.join(config) + '\n')
+                yaml.safe_dump(ctx.config, f, default_flow_style=False)
 
             log.info('Compressing logs...')
             run.wait(