diff --git a/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py b/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py index f8ca76ff85d..9f75404c000 100644 --- a/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py +++ b/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py @@ -549,9 +549,9 @@ class DownloadByUrl(Download, RecipeStep): if is_binary: log_file = os.path.join(install_environment.install_dir, basic_util.INSTALLATION_LOG) if os.path.exists(log_file): - logfile = open(log_file, 'ab') + logfile = open(log_file, 'a') else: - logfile = open(log_file, 'wb') + logfile = open(log_file, 'w') logfile.write('Successfully downloaded from url: %s\n' % action_dict['url']) logfile.close() log.debug('Successfully downloaded from url: %s' % action_dict['url']) diff --git a/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/tag_handler.py b/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/tag_handler.py index c1ef423a565..51ce81cb0c2 100644 --- a/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/tag_handler.py +++ b/lib/galaxy/tool_shed/galaxy_install/tool_dependencies/recipe/tag_handler.py @@ -253,10 +253,10 @@ class Repository(RecipeTag, SyncDatabase): text = url_get(tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth(tool_shed_url), pathspec=pathspec, params=params) if text: # Write the contents to a temporary file on disk so it can be reloaded and parsed. - fh = tempfile.NamedTemporaryFile('wb', prefix="tmp-toolshed-cttdc") + fh = tempfile.NamedTemporaryFile('w', prefix="tmp-toolshed-cttdc") tmp_filename = fh.name fh.close() - fh = open(tmp_filename, 'wb') + fh = open(tmp_filename, 'w') fh.write(text) fh.close() return tmp_filename