]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ragweed.py: open file in text mode
authorKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 13:14:36 +0000 (21:14 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 7 Apr 2020 13:51:23 +0000 (21:51 +0800)
this file is a template for `boto.cfg` which only contains text, so we
can just open it in text mode, and the file-like object will be passed
to run() as stdin, which is able to consume strings.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/ragweed.py

index a0454d03fa10287a6ceec354803d75a1bb3000d1..052992a498b0c2c5aaf1276dfd4ab63d13a93f7d 100644 (file)
@@ -212,7 +212,7 @@ def configure(ctx, config, run_stages):
     log.info('Configuring boto...')
     boto_src = os.path.join(os.path.dirname(__file__), 'boto.cfg.template')
     for client, properties in config['clients'].items():
-        with open(boto_src, 'rb') as f:
+        with open(boto_src, 'r') as f:
             (remote,) = ctx.cluster.only(client).remotes.keys()
             conf = f.read().format(
                 idle_timeout=config.get('idle_timeout', 30)