]> granicus.if.org Git - python/commit
Compare what's read from files against proper byte literals. Neither of these
authorBarry Warsaw <barry@python.org>
Sun, 12 Aug 2007 14:37:20 +0000 (14:37 +0000)
committerBarry Warsaw <barry@python.org>
Sun, 12 Aug 2007 14:37:20 +0000 (14:37 +0000)
commit72937f3216b8d771d305be0ed65b12e458f5f685
tree5a9e7a17627071daae6c2ef209f016859204fedb
parent46fc337395753e5b927f6dcccc549c54550b197e
Compare what's read from files against proper byte literals.  Neither of these
modules have unittests AFAICT, and I'm not improving things here, but these
changes make a bunch of email package tests succeed, and command line testing
against real files seems to make things better.

Added an __main__ section to imghdr.py so that it can be run from the command
line similarly to sndhdr.py.  Someone else can figure out a better -m way of
doing this.

In sndhdr.py do a couple of very minor cleanups, and use a with statement to
not wait for gc to close the file.
Lib/imghdr.py
Lib/sndhdr.py