Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: tools/testing/perf_testing/run_perf_tests.py

Issue 9911018: Fix path previously only intended for Windows. (Now runs also if the out directory doesn't exist). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/perf_testing/run_perf_tests.py
===================================================================
--- tools/testing/perf_testing/run_perf_tests.py (revision 5994)
+++ tools/testing/perf_testing/run_perf_tests.py (working copy)
@@ -14,6 +14,7 @@
from os.path import dirname, abspath
import platform
import shutil
+import stat
import subprocess
import time
import traceback
@@ -103,8 +104,9 @@
# error to be thrown when we use shutil.rmtree. This helper function changes
# the permissions so we can still delete the directory.
def on_rm_error(func, path, exc_info):
- os.chmod(path, stat.S_IWRITE)
- os.unlink(path)
+ if os.path.exists(path):
+ os.chmod(path, stat.S_IWRITE)
+ os.unlink(path)
# TODO(efortuna): building the sdk locally is a band-aid until all build
# platform SDKs are hosted in Google storage. Pull from https://sandbox.
# google.com/storage/?arg=dart-dump-render-tree#dart-dump-render-tree%2Fsdk
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698