Skip to content

Commit

Permalink
Write configfile in binary mode
Browse files Browse the repository at this point in the history
This fixes the unicode_stream tool on docker.
  • Loading branch information
mvdbeek committed Aug 15, 2018
1 parent a927413 commit b041e41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/galaxy/tools/evaluation.py
Expand Up @@ -32,6 +32,7 @@
SelectToolParameterWrapper,
ToolParameterValueWrapper,
)
from galaxy.util import smart_str
from galaxy.util.bunch import Bunch
from galaxy.util.none_like import NoneDataset
from galaxy.util.object_wrapper import wrap_with_safe_string
Expand Down Expand Up @@ -574,8 +575,8 @@ def __write_workdir_file(self, config_filename, content, context, is_template=Tr
value = fill_template(content, context=context)
else:
value = content
with open(config_filename, "w") as f:
f.write(value)
with open(config_filename, "wb") as f:
f.write(smart_str(value))
# For running jobs as the actual user, ensure the config file is globally readable
os.chmod(config_filename, 0o644)

Expand Down

0 comments on commit b041e41

Please sign in to comment.