| Index: gclient_utils.py
|
| diff --git a/gclient_utils.py b/gclient_utils.py
|
| index 9ba6da50c4b7c50926ca13aa937c84d94234f72f..e43577b67ccedc51d26b87f3883880e158d13565 100644
|
| --- a/gclient_utils.py
|
| +++ b/gclient_utils.py
|
| @@ -78,7 +78,11 @@ class PrintableObject(object):
|
|
|
| def FileRead(filename, mode='rU'):
|
| with codecs.open(filename, mode=mode, encoding='utf-8') as f:
|
| - return f.read()
|
| + content = f.read()
|
| + if mode.endswith('U'):
|
| + # codecs.open() has different behavior than open() on python 2.6.
|
| + return content.replace('\r\n', '\n')
|
| + return content
|
|
|
|
|
| def FileWrite(filename, content, mode='w'):
|
|
|