donnm / mtk_fw_tools

Mediatek firmware unpacking/repacking tools
GNU General Public License v3.0
38 stars 15 forks source link

unalice.py: Python2 compatibility fix. #3

Closed pfalcon closed 6 years ago

pfalcon commented 6 years ago

In py2, file.write() returns None.

pfalcon commented 6 years ago

This seems to be the only incompatibility with py2 so far, makes sense to fix it. py2 compatibility in turn makes it easier to use pypy (which many distros ship only pypy2 so far), which runs processing really fast.

(Otherwise, I'd encourage to stick with py3 of course. Thanks for giving a chance to rewriting tools in Python btw, sorry that it's somewhat slow, still fully worth it imho.)