From 86841c390ca58135d68cf8baea6f81291f56dfbf Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 12 Feb 2020 01:29:57 +0000 Subject: [PATCH] Small cleanup --- lib/galaxy/tools/toolbox/integrated_panel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tools/toolbox/integrated_panel.py b/lib/galaxy/tools/toolbox/integrated_panel.py index d40d9524a24..9e3020282bd 100644 --- a/lib/galaxy/tools/toolbox/integrated_panel.py +++ b/lib/galaxy/tools/toolbox/integrated_panel.py @@ -102,13 +102,13 @@ $INTEGRATED_TOOL_PANEL tool_panel_description = '\n '.join([l for l in INTEGRATED_TOOL_PANEL_DESCRIPTION.split("\n") if l]) tp_string = template.substitute(INTEGRATED_TOOL_PANEL_DESCRIPTION=tool_panel_description, INTEGRATED_TOOL_PANEL='\n'.join(integrated_tool_panel)) - with RenamedTemporaryFile(filename, mode='w') as integrated_tool_panel_file: - integrated_tool_panel_file.write(tp_string) + with RenamedTemporaryFile(filename, mode='w') as f: + f.write(tp_string) if tracking_directory: - open(filename + ".stack", "w").write(''.join(traceback.format_stack())) + with open(filename + ".stack", "w") as f: + f.write(''.join(traceback.format_stack())) shutil.copy(filename, filename + ".copy") - filename = filename + ".copy" - shutil.move(filename, destination) + shutil.move(filename + ".copy", destination) try: os.chmod(destination, 0o644) except OSError: