[Jython-checkins] jython: Fixed 'ValueError: bad marshal data' issue occurring on Windows when processing

stefan.richthofer jython-checkins at python.org
Sat Feb 25 18:54:02 EST 2017


https://hg.python.org/jython/rev/5861112d6d39
changeset:   8035:5861112d6d39
user:        Stefan Richthofer <stefan.richthofer at gmx.de>
date:        Sun Feb 26 00:53:20 2017 +0100
summary:
  Fixed 'ValueError: bad marshal data' issue occurring on Windows when processing bytecode for oversized functions; see #527524,  http://bugs.jython.org/msg11130

files:
  src/org/python/compiler/Module.java |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/src/org/python/compiler/Module.java b/src/org/python/compiler/Module.java
--- a/src/org/python/compiler/Module.java
+++ b/src/org/python/compiler/Module.java
@@ -717,7 +717,7 @@
         String pyc_filename = filename+"c";
         File pyc_file = new File(pyc_filename);
         if (pyc_file.exists()) {
-            PyFile f = new PyFile(pyc_filename, "r", 4096);
+            PyFile f = new PyFile(pyc_filename, "rb", 4096);
             byte[] bts = f.read(8).toBytes();
             int magic = (bts[1]<< 8) & 0x0000FF00 |
                         (bts[0]<< 0) & 0x000000FF;

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list