Skip to content

Commit

Permalink
More improved file handling for job code.
Browse files Browse the repository at this point in the history
Another stab in the dark that won't actually fix the testing issues with Docker.
  • Loading branch information
jmchilton committed Oct 5, 2015
1 parent a47f9de commit 4e35ff0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/jobs/command_factory.py
Expand Up @@ -73,9 +73,9 @@ def build_command(

def __externalize_commands(job_wrapper, commands_builder, remote_command_params, script_name="tool_script.sh"):
local_container_script = join( job_wrapper.working_directory, script_name )
fh = file( local_container_script, "w" )
fh.write( "#!%s\n%s" % (DEFAULT_SHELL, commands_builder.build()))
fh.close()
with open( local_container_script, "w" ) as f:
script_contents = "#!%s\n%s" % (DEFAULT_SHELL, commands_builder.build())
f.write( script_contents )
chmod( local_container_script, 0755 )

commands = local_container_script
Expand Down

0 comments on commit 4e35ff0

Please sign in to comment.