From 936f314a63ccdc4a83591174e45c8b1eef532918 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 6 Feb 2013 09:04:37 -0800 Subject: [PATCH] rgw: fix testdir format on f Format the path, not filehandle --- teuthology/task/rgw.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/teuthology/task/rgw.py b/teuthology/task/rgw.py index e9d5cafd6f..ba92fcc30e 100644 --- a/teuthology/task/rgw.py +++ b/teuthology/task/rgw.py @@ -50,14 +50,17 @@ def ship_config(ctx, config): assert isinstance(config, dict) testdir = teuthology.get_testdir(ctx) log.info('Shipping apache config and rgw.fcgi...') - src = os.path.join(os.path.dirname(__file__), 'apache.conf.template') + src = os.path.join(os.path.dirname(__file__) + , 'apache.conf.template').format( + testdir=testdir + ) for client in config.iterkeys(): (remote,) = ctx.cluster.only(client).remotes.keys() with file(src, 'rb') as f: teuthology.write_file( remote=remote, path='{tdir}/apache/apache.conf'.format(tdir=testdir), - data=f.format(testdir=testdir), + data=f, ) teuthology.write_file( remote=remote, -- 2.39.5