| Index: chrome/test/pyautolib/pyauto_utils.py
|
| diff --git a/chrome/test/pyautolib/pyauto_utils.py b/chrome/test/pyautolib/pyauto_utils.py
|
| index 4d3a3d1f5f14d31a51fb21639a85982ee6579b3f..bd0945ce1523c871d2e96d5c9e3a702daa2b26c9 100644
|
| --- a/chrome/test/pyautolib/pyauto_utils.py
|
| +++ b/chrome/test/pyautolib/pyauto_utils.py
|
| @@ -77,3 +77,12 @@ class ExistingPathReplacer(object):
|
| def _RemoveBackupDir(self):
|
| if self._backup_dir and os.path.isdir(self._backup_dir):
|
| shutil.rmtree(self._backup_dir, ignore_errors=True)
|
| +
|
| +
|
| +def RemovePath(path):
|
| + """Remove the given path (file or dir)."""
|
| + if os.path.isdir(path):
|
| + shutil.rmtree(path, ignore_errors=True)
|
| + return
|
| + os.remove(path)
|
| +
|
|
|