Commit 850053f9 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12982 from eldruin:python-gen-close-file

parents fa91d621 7a884ab6
......@@ -1091,6 +1091,7 @@ if __name__ == "__main__":
if len(sys.argv) > 1:
dstdir = sys.argv[1]
if len(sys.argv) > 2:
srcfiles = [f.strip() for f in open(sys.argv[2], 'r').readlines()]
with open(sys.argv[2], 'r') as f:
srcfiles = [l.strip() for l in f.readlines()]
generator = PythonWrapperGenerator()
generator.gen(srcfiles, dstdir)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment