From 0303212d49e9fb1f1a8d3d15faba9c5375262504 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 2 Apr 2013 20:35:44 +0000 Subject: [PATCH] [r21853]ImportProGen: Fix "with" statement syntax. svn: r21856 --- gramps/plugins/importer/importprogen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/importer/importprogen.py b/gramps/plugins/importer/importprogen.py index 6279f8021..e49e13a09 100644 --- a/gramps/plugins/importer/importprogen.py +++ b/gramps/plugins/importer/importprogen.py @@ -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')