Use `with` statement

This commit is contained in:
mvdbeek
2019-03-04 16:45:11 +00:00
committed by Nicola Soranzo
parent b84607728d
commit c1f8221b0b
+2 -1
View File
@@ -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):