summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 18:33:44 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 18:33:44 +0000
commit60e99a38d1126b17d25108ca446e4f0d0a0efd2b (patch)
treeccb300e5923ae7da6bc25e728f02962478983663 /chrome
parent64ddea3f8a8b34fb982dfae11a88e9eeceb705e7 (diff)
downloadchromium_src-60e99a38d1126b17d25108ca446e4f0d0a0efd2b.zip
chromium_src-60e99a38d1126b17d25108ca446e4f0d0a0efd2b.tar.gz
chromium_src-60e99a38d1126b17d25108ca446e4f0d0a0efd2b.tar.bz2
Deal with transient files better when removing a path in tests.
Helps prevent problems when a temporary file suddenly gets deleted by Chrome, in download tests. Review URL: http://codereview.chromium.org/3192019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/pyautolib/pyauto_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/test/pyautolib/pyauto_utils.py b/chrome/test/pyautolib/pyauto_utils.py
index bd0945c..0390497 100644
--- a/chrome/test/pyautolib/pyauto_utils.py
+++ b/chrome/test/pyautolib/pyauto_utils.py
@@ -84,5 +84,8 @@ def RemovePath(path):
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=True)
return
- os.remove(path)
+ try:
+ os.remove(path)
+ except OSError:
+ pass