Merge branch 'release_19.09' into release_20.01

This commit is contained in:
Nicola Soranzo
2020-02-26 11:04:12 +01:00
2 changed files with 4 additions and 4 deletions
@@ -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'])
@@ -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