]> git.parisson.com Git - pdf.js.git/commitdiff
Fix md5 for windows
authorBrendan Dahl <brendan.dahl@gmail.com>
Mon, 7 Nov 2011 20:44:06 +0000 (12:44 -0800)
committerBrendan Dahl <brendan.dahl@gmail.com>
Mon, 7 Nov 2011 20:44:06 +0000 (12:44 -0800)
test/test.py

index bce5ae8f3d73749ab01cc52e93097783084c441e..65def5d8eeee4b4331c921fe41ddfdc1e4f8a140 100644 (file)
@@ -321,7 +321,7 @@ def verifyPDFs(manifestList):
     for item in manifestList:
         f = item['file']
         if os.access(f, os.R_OK):
-            fileMd5 = hashlib.md5(open(f).read()).hexdigest()
+            fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest()
             if 'md5' not in item:
                 print 'ERROR: Missing md5 for file "' + f + '".',
                 print 'Hash for current file is "' + fileMd5 + '"'