summaryrefslogtreecommitdiffstats
path: root/qa
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2020-04-06 15:14:36 +0200
committerKefu Chai <kchai@redhat.com>2020-04-07 15:51:23 +0200
commit3809737fb859ebebe72d635708e0d69676cc5aa6 (patch)
tree21141ccc64d5f6e0a911fccc66b0a034538c262d /qa
parentqa,test: decode return val of base64.b64encode() (diff)
downloadceph-3809737fb859ebebe72d635708e0d69676cc5aa6.tar.xz
ceph-3809737fb859ebebe72d635708e0d69676cc5aa6.zip
qa/tasks/ragweed.py: open file in text mode
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>
Diffstat (limited to 'qa')
-rw-r--r--qa/tasks/ragweed.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qa/tasks/ragweed.py b/qa/tasks/ragweed.py
index a0454d03fa1..052992a498b 100644
--- a/qa/tasks/ragweed.py
+++ b/qa/tasks/ragweed.py
@@ -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)