(stream)
| 22 | |
| 23 | |
| 24 | def read_code(stream): |
| 25 | # This helper is needed in order for the PEP 302 emulation to |
| 26 | # correctly handle compiled files |
| 27 | import marshal |
| 28 | |
| 29 | magic = stream.read(4) |
| 30 | if magic != importlib.util.MAGIC_NUMBER: |
| 31 | return None |
| 32 | |
| 33 | stream.read(12) # Skip rest of the header |
| 34 | return marshal.load(stream) |
| 35 | |
| 36 | |
| 37 | def walk_packages(path=None, prefix='', onerror=None): |
no test coverage detected
searching dependent graphs…