Commits

Martin Geisler  committed e27103d

Remove Python 2.6-isms from build process

  • Participants
  • Parent commits 793cb11

Comments (0)

Files changed (2)

         fh.write(g)
 
 if __name__ == '__main__':
-    with open('mygrammar.py', 'w') as fh:
-        generate(imports, precedence, tokens, grammar, fh)
+    fh = open('mygrammar.py', 'w')
+    generate(imports, precedence, tokens, grammar, fh)
+    fh.close()
 
 import pgen
 import os
-with open(os.path.join('revspec', 'revspecbnf.py'), 'w') as fh:
-    pgen.generate(pgen.imports, pgen.precedence, pgen.tokens, pgen.grammar, fh)
+
+fh = open(os.path.join('revspec', 'revspecbnf.py'), 'w')
+pgen.generate(pgen.imports, pgen.precedence, pgen.tokens, pgen.grammar, fh)
+fh.close()
 
 setup(
     name = 'hgrevspec',