Changeset 416

Show
Ignore:
Timestamp:
Wed Feb 6 13:48:21 2008
Author:
giovannibajo
Message:

Fix weird exception: "PYZ entry 'encodings' (0j) is not a valid code object"

The actual problem is that marshal.loads() is feed a compressed stream.
This happens because zlib could not be imported because of a packaging/extraction
bug. Thus, instead of raising this weird exception, we prefer to raise
a straightforward RuntimeError? "cannot import zlib", so that at least the
cause is clear.

The underlying problem of course must be fixed elsewhere...

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/startup_crash/archive.py

    r43 r416  
    276 276 class DummyZlib:  
    277 277     def decompress(self, data):  
    278           return data  
      278         raise RuntimeError, "zlib required but cannot be imported"  
    278 278     def compress(self, data, lvl):  
    279           return data  
      279         raise RuntimeError, "zlib required but cannot be imported"  
    279 279  
    280 280 import iu