]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
worker: give a text file to yaml.safe_dump for py3
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Thu, 12 Dec 2019 23:53:44 +0000 (00:53 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Fri, 13 Dec 2019 16:49:38 +0000 (17:49 +0100)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/worker.py

index 59f094320afd3c3d989b59cc2876504599ce4023..9ea48e2c9129b16a0a02fb38d56f904102e0651e 100644 (file)
@@ -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)