packages: pynapi/pynapi.py - open(file, "rb") - Windows compatibile
areq
areq at pld-linux.org
Sun Jul 25 23:35:56 CEST 2010
Author: areq Date: Sun Jul 25 21:35:56 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- open(file, "rb") - Windows compatibile
---- Files affected:
packages/pynapi:
pynapi.py (1.42 -> 1.43)
---- Diffs:
================================================================
Index: packages/pynapi/pynapi.py
diff -u packages/pynapi/pynapi.py:1.42 packages/pynapi/pynapi.py:1.43
--- packages/pynapi/pynapi.py:1.42 Thu Apr 1 22:49:33 2010
+++ packages/pynapi/pynapi.py Sun Jul 25 23:35:51 2010
@@ -110,7 +110,7 @@
def calculate_digest(file):
d = md5()
try:
- d.update(open(file).read(10485760))
+ d.update(open(file, "rb").read(10485760))
except (IOError, OSError), e:
raise Exception('Hashing video file failed: %s' % ( e ))
return d.hexdigest()
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pynapi/pynapi.py?r1=1.42&r2=1.43&f=u
More information about the pld-cvs-commit
mailing list