| Index: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
|
| index 9e5279b7453097e7f3ef1c92bca34efc0294f7d8..7673332eb6f8d72324fde94fa4288d7daa62f312 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
|
| @@ -45,7 +45,8 @@ class FileSystem(object):
|
| """FileSystem interface for webkitpy.
|
|
|
| Unless otherwise noted, all paths are allowed to be either absolute
|
| - or relative."""
|
| + or relative.
|
| + """
|
| sep = os.sep
|
| pardir = os.pardir
|
|
|
| @@ -217,14 +218,16 @@ class FileSystem(object):
|
| def read_text_file(self, path):
|
| """Return the contents of the file at the given path as a Unicode string.
|
|
|
| - The file is read assuming it is a UTF-8 encoded file with no BOM."""
|
| + The file is read assuming it is a UTF-8 encoded file with no BOM.
|
| + """
|
| with codecs.open(path, 'r', 'utf8') as f:
|
| return f.read()
|
|
|
| def write_text_file(self, path, contents):
|
| """Write the contents to the file at the given location.
|
|
|
| - The file is written encoded as UTF-8 with no BOM."""
|
| + The file is written encoded as UTF-8 with no BOM.
|
| + """
|
| with codecs.open(path, 'w', 'utf8') as f:
|
| f.write(contents)
|
|
|
| @@ -242,7 +245,8 @@ class FileSystem(object):
|
| """On Windows, if a process was recently killed and it held on to a
|
| file, the OS will hold on to the file for a short while. This makes
|
| attempts to delete the file fail. To work around that, this method
|
| - will retry for a few seconds until Windows is done with the file."""
|
| + will retry for a few seconds until Windows is done with the file.
|
| + """
|
| try:
|
| exceptions.WindowsError
|
| except AttributeError:
|
|
|