Commits

Benoît Allard committed f7f811c

read binary files in binary mode

Comments (0)

Files changed (2)

                     if filename.endswith('.exp'):
                         if options.verbose: print "Processing %s" % os.path.join(dirname, filename)
                         # Good to go !
-                        f = open(os.path.join(dirname, filename))
+                        f = open(os.path.join(dirname, filename), 'rb')
                         exp = ExportFile(f.read())
                         refs = process(exp, options)
                         res.append(refs)
         else:
-            f = open(path)
+            f = open(path, 'rb')
             exp = ExportFile(f.read())
             refs = process(exp, options)
             res.append(refs)
 
 from caprunner.exportfile import ExportFile
 
-f = open(sys.argv[1])
+f = open(sys.argv[1], 'rb')
 exp = ExportFile(f.read())
 exp.pprint()