author | Augie Fackler <augie@google.com> |
Fri, 05 Aug 2016 14:00:56 -0400 | |
changeset 29731 | 8d1cdee372e6 |
parent 29730 | 4d23cd6e2219 |
child 29732 | 0806fa2a39d8 |
tests/md5sum.py | file | annotate | diff | comparison | revisions |
--- a/tests/md5sum.py Fri Aug 05 14:00:46 2016 -0400 +++ b/tests/md5sum.py Fri Aug 05 14:00:56 2016 -0400 @@ -34,10 +34,7 @@ m = md5() try: - while True: - data = fp.read(8192) - if not data: - break + for data in iter(lambda: fp.read(8192), ''): m.update(data) except IOError as msg: sys.stderr.write('%s: I/O error: %s\n' % (filename, msg))