[r21853]ImportProGen: Fix "with" statement syntax.

svn: r21856
This commit is contained in:
John Ralls 2013-04-02 20:35:44 +00:00
parent a67b7b7d11
commit 0303212d49

View File

@ -463,7 +463,8 @@ class PG30_Def:
# This can throw a IOError
import io
lines = None
with f = io.open(fname, buffering=1, encoding='cp437', errors='strict'):
with io.open(fname, buffering=1,
encoding='cp437', errors='strict') as f:
lines = f.readlines()
lines = [l.strip() for l in lines]
content = '\n'.join(lines).encode('utf-8')