From 7d151371092ac27956ff3a4802e2ecf53422ffba Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Tue, 23 Aug 2011 20:01:50 +0000 Subject: [PATCH] Bugfix for 5146 and 5106 - ImportProGen fails on Windows because some files must be read as "binary". svn: r18059 --- src/plugins/import/ImportProGen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/import/ImportProGen.py b/src/plugins/import/ImportProGen.py index c53d52c97..ffa471398 100644 --- a/src/plugins/import/ImportProGen.py +++ b/src/plugins/import/ImportProGen.py @@ -109,7 +109,7 @@ def _read_mem(bname): fname = bname + '.MEM' else: fname = bname + '.mem' - f = open(fname) + f = open(fname, "rb") recfmt = "i28s" reclen = struct.calcsize( recfmt ) #print "# reclen = %d" % reclen @@ -130,7 +130,7 @@ def _read_recs(table, bname): fname = bname + table.fileext else: fname = bname + table.fileext.lower() - f = open(fname) + f = open(fname, "rb") recfmt = table.recfmt log.info("# %s - recfmt = %s" % (table['name1'], recfmt)) reclen = struct.calcsize( recfmt )