mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Merge pull request #6915 from mvdbeek/6904_followup
[18.09] Small followup to #6904
This commit is contained in:
@@ -40,8 +40,8 @@ class DataManagerHandler(object):
|
||||
try:
|
||||
with RenamedTemporaryFile(config_filename, mode='w') as fh:
|
||||
fh.write(xml_to_string(root))
|
||||
except Exception as e:
|
||||
log.exception("Exception in DataManagerHandler.data_manager_config_elems_to_xml_file:\n %s", str(e))
|
||||
except Exception:
|
||||
log.exception("Exception in DataManagerHandler.data_manager_config_elems_to_xml_file")
|
||||
|
||||
def install_data_managers(self, shed_data_manager_conf_filename, metadata_dict, shed_config_dict,
|
||||
relative_install_dir, repository, repository_tools_tups):
|
||||
|
||||
@@ -24,9 +24,8 @@ class Py27CommentedTreeBuilder(XmlET.TreeBuilder):
|
||||
|
||||
def create_and_write_tmp_file(elem):
|
||||
tmp_str = xml_to_string(elem, pretty=True)
|
||||
fh = tempfile.NamedTemporaryFile(prefix="tmp-toolshed-cawrf", delete=False)
|
||||
tmp_filename = fh.name
|
||||
fh.close()
|
||||
with tempfile.NamedTemporaryFile(prefix="tmp-toolshed-cawrf", delete=False) as fh:
|
||||
tmp_filename = fh.name
|
||||
with io.open(tmp_filename, mode='w', encoding='utf-8') as fh:
|
||||
fh.write(tmp_str)
|
||||
return tmp_filename
|
||||
|
||||
Reference in New Issue
Block a user