util: make readfile() operate in binary mode
authorPatrick Mezard <pmezard@gmail.com>
Sat, 07 May 2011 21:12:35 +0200
changeset 14250 34ec9b313638
parent 14249 f4766e1bb0b3
child 14251 258fbccf22f5
util: make readfile() operate in binary mode writefile() and appendfile() are already working that way.
mercurial/util.py
--- a/mercurial/util.py	Sat May 07 21:12:33 2011 +0200
+++ b/mercurial/util.py	Sat May 07 21:12:35 2011 +0200
@@ -772,7 +772,7 @@
     makedirs(name, mode)
 
 def readfile(path):
-    fp = open(path)
+    fp = open(path, 'rb')
     try:
         return fp.read()
     finally: