Chromium Code Reviews| Index: chrome/test/chromedriver/util.py |
| diff --git a/chrome/test/chromedriver/util.py b/chrome/test/chromedriver/util.py |
| index b28502af483216d8c65e85310d0e55c2db5383e5..dc862d3e96db521194b07353619472e087697d08 100644 |
| --- a/chrome/test/chromedriver/util.py |
| +++ b/chrome/test/chromedriver/util.py |
| @@ -39,6 +39,14 @@ def IsMac(): |
| return sys.platform.startswith('darwin') |
| +def GetAbsolutePathOfUserPath(user_path): |
| + """Expand the given |user_path| (like "~/file") and return its absolute path. |
| + """ |
| + if not user_path: |
|
craigdh
2014/01/29 18:47:35
The empty string will cause this to return None. I
stgao
2014/01/29 19:40:27
Nice catch.
Done.
|
| + return None |
| + return os.path.abspath(os.path.expanduser(user_path)) |
| + |
| + |
| def _DeleteDir(path): |
| """Deletes a directory recursively, which must exist.""" |
| # Don't use shutil.rmtree because it can't delete read-only files on Win. |