Skip to content

Commit

Permalink
Fix Python 3.4 problem causing Travis failure of dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jan 14, 2016
1 parent 793fbdb commit ba592a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/jobs/runners/util/job_script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
from pkg_resources import resource_string

from six import text_type
from galaxy.util import unicodify

DEFAULT_SHELL = '/bin/sh'
Expand Down Expand Up @@ -96,7 +97,7 @@ def check_script_integrity(config):

def write_script(path, contents, config, mode=0o755):
with open(path, 'w') as f:
if isinstance(contents, unicode):
if isinstance(contents, text_type):
contents = contents.encode("UTF-8")
f.write(contents)
os.chmod(path, mode)
Expand Down

0 comments on commit ba592a7

Please sign in to comment.