Skip to content

Commit

Permalink
Close tempfile handles.
Browse files Browse the repository at this point in the history
  • Loading branch information
davebx committed Feb 12, 2018
1 parent 6d00958 commit 2e51d05
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/galaxy/tools/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ def __init__(self, app_name,
self.config = Bunch()
self.config.tool_data_path = tool_data_path
self.config.shed_tool_data_path = shed_tool_data_path
_, self.config.tool_data_table_config = tempfile.mkstemp()
_, self.config.shed_tool_data_table_config = tempfile.mkstemp()
tool_data_table_handle, self.config.tool_data_table_config = tempfile.mkstemp()
shed_tool_data_table_handle, self.config.shed_tool_data_table_config = tempfile.mkstemp()
self.tool_data_tables = tool_data_tables
self.datatypes_registry = registry or Registry()
self.hgweb_config_manager = hgweb_config_manager
_, self.config.len_file_path = tempfile.mkstemp()
_, self.config.builds_file_path = tempfile.mkstemp()
len_file_handle, self.config.len_file_path = tempfile.mkstemp()
builds_file_handle, self.config.builds_file_path = tempfile.mkstemp()
for fh in [tool_data_table_handle, shed_tool_data_table_handle, len_file_handle, builds_file_handle]:
os.close(fh)
self.genome_builds = GenomeBuilds(self)

def __enter__(self):
Expand Down

0 comments on commit 2e51d05

Please sign in to comment.