SilentGhost added the comment: Martin, it would be better if you do the check the way it's done in test_rast: h.startswith(b'\x76\x2f\x31\x01')
Otherwise, you need to check that that h has at least 4 elements (if it doesn't you'll get an IndexError). ---------- nosy: +SilentGhost _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20295> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com