ImportProGen: Fix "with" statement syntax.

svn: r21853
This commit is contained in:
John Ralls 2013-04-02 20:25:03 +00:00
parent f2809f4249
commit 4dc31ff808

View File

@ -463,7 +463,8 @@ class PG30_Def:
# This can throw a IOError # This can throw a IOError
import io import io
lines = None 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 = f.readlines()
lines = [l.strip() for l in lines] lines = [l.strip() for l in lines]
content = '\n'.join(lines).encode('utf-8') content = '\n'.join(lines).encode('utf-8')