Sometime the MPQ file listing will include files for which there is no data (example). In these cases, read_file returns None and extract_to_disk fails with a type error:
Traceback (most recent call last):
File "/home/graylinkim/projects/sc2reader/env/bin/mpyq", line 8, in <module>
load_entry_point('mpyq==0.2.0', 'console_scripts', 'mpyq')()
File "build/bdist.linux-x86_64/egg/mpyq.py", line 402, in main
File "build/bdist.linux-x86_64/egg/mpyq.py", line 254, in extract_to_disk
TypeError: must be string or buffer, not None
We can just substitute an empty string for None when writing to disk.
Sometime the MPQ file listing will include files for which there is no data (example). In these cases,
read_file
returnsNone
andextract_to_disk
fails with a type error:We can just substitute an empty string for
None
when writing to disk.