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

Unified Diff: tools/utils.py

Issue 1519063004: - Prevent running of the dart_bootstrap script by default. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « tools/observatory_tool.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/utils.py
diff --git a/tools/utils.py b/tools/utils.py
index a6e7f5181c9ab850ab2433461307519d18095d71..efcb886bfc5935b28d2e2b3e5945730055732d7f 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -634,8 +634,9 @@ def CheckedInSdkCheckExecutable():
canary_script = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'canary.dart')
try:
- if 42 == subprocess.call([executable, canary_script]):
- return True
+ with open(os.devnull, 'wb') as silent_sink:
+ if 0 == subprocess.call([executable, canary_script], stdout=silent_sink):
+ return True
except OSError as e:
pass
return False
« no previous file with comments | « tools/observatory_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698