]> granicus.if.org Git - python/commit
Improved patches for sndhdr and imghdr by Victor Stinner, who writes:
authorGuido van Rossum <guido@python.org>
Mon, 13 Aug 2007 17:50:00 +0000 (17:50 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 13 Aug 2007 17:50:00 +0000 (17:50 +0000)
commitc9341281625071479dfee3ba85e552f18dfa3a36
tree58bebd062f0fe8f007170c53e77a2b186117758b
parent4c269c59287ec2f40db4c899e163ce6946742dbd
Improved patches for sndhdr and imghdr by Victor Stinner, who writes:
 - fix "h[sbseek] == b'\1'" and "ratecode = ord(h[sbseek+4])" in test_voc()
 - avoid division by zero
 - use startswith method: replace h[:2] == b'BM' by h.startswith(b'BM')
 - use aifc.open() instead of old aifc.openfp()
 - use ord(b'P') instead of ord('P')
Lib/imghdr.py
Lib/sndhdr.py