From 12e03e913d945c6c7087ab9fcf58c1b8a2aef578 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 13 Dec 2019 00:53:44 +0100 Subject: [PATCH] worker: give a text file to yaml.safe_dump for py3 Signed-off-by: Kyr Shatskyy --- teuthology/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/worker.py b/teuthology/worker.py index 59f094320a..9ea48e2c91 100644 --- a/teuthology/worker.py +++ b/teuthology/worker.py @@ -254,7 +254,7 @@ def run_job(job_config, teuth_bin_path, archive_dir, verbose): arg.append('--') with tempfile.NamedTemporaryFile(prefix='teuthology-worker.', - suffix='.tmp',) as tmp: + suffix='.tmp', mode='w+t') as tmp: yaml.safe_dump(data=job_config, stream=tmp) tmp.flush() arg.append(tmp.name) -- 2.39.5