| Index: PRESUBMIT.py
|
| ===================================================================
|
| --- PRESUBMIT.py (revision 18008)
|
| +++ PRESUBMIT.py (working copy)
|
| @@ -24,19 +24,7 @@
|
| r"v8[\\\/].*",
|
| ]
|
|
|
| -def ReadFile(path):
|
| - """Given a path, returns the full contents of the file.
|
|
|
| - Reads files in binary format.
|
| - """
|
| - fo = open(path, 'rb')
|
| - try:
|
| - contents = fo.read()
|
| - finally:
|
| - fo.close()
|
| - return contents
|
| -
|
| -
|
| def CheckChangeOnUpload(input_api, output_api):
|
| # TODO(maruel): max_cols is temporarily disabled. Reenable once the source
|
| # tree is in better shape.
|
| @@ -100,7 +88,7 @@
|
|
|
| # Need to read the file ourselves since AffectedFile.NewContents()
|
| # will normalize line endings.
|
| - contents = ReadFile(f.AbsoluteLocalPath())
|
| + contents = input_api.ReadFile(f)
|
| if '\r' in contents:
|
| cr_files.append(path)
|
|
|
|
|