]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix testdir format on f
authorSage Weil <sage@inktank.com>
Wed, 6 Feb 2013 17:04:37 +0000 (09:04 -0800)
committerSage Weil <sage@inktank.com>
Wed, 6 Feb 2013 17:04:37 +0000 (09:04 -0800)
Format the path, not filehandle

teuthology/task/rgw.py

index e9d5cafd6f9aafb782e06abf9b48dd05b78df146..ba92fcc30ee0f96433486eadfa6b444e0a26f44e 100644 (file)
@@ -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,