--- a/tests/md5sum.py Tue Aug 22 12:58:51 2017 -0400
+++ b/tests/md5sum.py Tue Aug 22 14:57:10 2017 -0400
@@ -8,17 +8,11 @@
from __future__ import absolute_import
+import hashlib
import os
import sys
try:
- import hashlib
- md5 = hashlib.md5
-except ImportError:
- import md5
- md5 = md5.md5
-
-try:
import msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
@@ -32,7 +26,7 @@
sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg))
sys.exit(1)
- m = md5()
+ m = hashlib.md5()
try:
for data in iter(lambda: fp.read(8192), b''):
m.update(data)