@@ -192,7 +192,7 @@ def _execute(self, runtime, env, rm_tmpdir=True, move_outputs="move"):
192
192
os .makedirs (dn )
193
193
stdout_path = absout
194
194
195
- build_job_script = self .builder .build_job_script # type: Callable[[List[str]], Text ]
195
+ build_job_script = self .builder .build_job_script # type: Callable[[List[str]], str ]
196
196
rcode = _job_popen (
197
197
[Text (x ).encode ('utf-8' ) for x in runtime + self .command_line ],
198
198
stdin_path = stdin_path ,
@@ -315,7 +315,7 @@ def add_volumes(self, pathmapper, runtime, stage_output):
315
315
shutil .copytree (vol .resolved , vol .target )
316
316
elif vol .type == "CreateFile" :
317
317
createtmp = os .path .join (host_outdir , os .path .basename (vol .target ))
318
- with open (createtmp , "w " ) as f :
318
+ with open (createtmp , "wb " ) as f :
319
319
f .write (vol .resolved .encode ("utf-8" ))
320
320
runtime .append (u"--volume=%s:%s:ro" % (createtmp , vol .target ))
321
321
@@ -399,11 +399,11 @@ def _job_popen(
399
399
env , # type: Union[MutableMapping[Text, Text], MutableMapping[str, str]]
400
400
cwd , # type: Text
401
401
job_dir = None , # type: Text
402
- build_job_script = None , # type: Callable[[List[str]], Text ]
402
+ build_job_script = None , # type: Callable[[List[str]], str ]
403
403
):
404
404
# type: (...) -> int
405
405
406
- job_script_contents = None # type: Text
406
+ job_script_contents = None
407
407
if build_job_script :
408
408
job_script_contents = build_job_script (commands )
409
409
0 commit comments