From cd8f31db0f55e6c8fdfd09820865d973ec6f676c Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 15 Jun 2011 11:50:32 -0700 Subject: [PATCH] Write config.yaml directly to file. --- teuthology/task/ceph.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index c0ea86196fa54..544cc7f817a02 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -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( -- 2.39.5