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

Side by Side Diff: build/android/pylib/constants.py

Issue 18566007: Print adb missing warning to stderr, not stdout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Defines a set of constants shared by test runners and other scripts.""" 5 """Defines a set of constants shared by test runners and other scripts."""
6 6
7 import os 7 import os
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 def _GetADBPath(): 86 def _GetADBPath():
87 if os.environ.get('ANDROID_SDK_ROOT'): 87 if os.environ.get('ANDROID_SDK_ROOT'):
88 return 'adb' 88 return 'adb'
89 # If envsetup.sh hasn't been sourced and there's no adb in the path, 89 # If envsetup.sh hasn't been sourced and there's no adb in the path,
90 # set it here. 90 # set it here.
91 try: 91 try:
92 with file(os.devnull, 'w') as devnull: 92 with file(os.devnull, 'w') as devnull:
93 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 93 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
94 return 'adb' 94 return 'adb'
95 except OSError: 95 except OSError:
96 print 'No adb found in $PATH, fallback to checked in binary.' 96 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.'
97 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 97 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
98 98
99 99
100 ADB_PATH = _GetADBPath() 100 ADB_PATH = _GetADBPath()
OLDNEW
« 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