equal
deleted
inserted
replaced
32 sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg)) |
32 sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg)) |
33 sys.exit(1) |
33 sys.exit(1) |
34 |
34 |
35 m = md5() |
35 m = md5() |
36 try: |
36 try: |
37 for data in iter(lambda: fp.read(8192), ''): |
37 for data in iter(lambda: fp.read(8192), b''): |
38 m.update(data) |
38 m.update(data) |
39 except IOError as msg: |
39 except IOError as msg: |
40 sys.stderr.write('%s: I/O error: %s\n' % (filename, msg)) |
40 sys.stderr.write('%s: I/O error: %s\n' % (filename, msg)) |
41 sys.exit(1) |
41 sys.exit(1) |
42 sys.stdout.write('%s %s\n' % (m.hexdigest(), filename)) |
42 sys.stdout.write('%s %s\n' % (m.hexdigest(), filename)) |