mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use `with` statement
This commit is contained in:
@@ -102,7 +102,8 @@ class UsesTools(object):
|
||||
|
||||
def __write_tool(self, contents, path=None):
|
||||
path = path or self.tool_file
|
||||
open(path, "w").write(contents)
|
||||
with open(path, "w") as out:
|
||||
out.write(contents)
|
||||
|
||||
|
||||
class MockContext(object):
|
||||
|
||||
Reference in New Issue
Block a user