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

Unified Diff: build/android/buildbot/bb_device_status_check.py

Issue 48523003: Android: further fixes to bb_device_status_check.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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: build/android/buildbot/bb_device_status_check.py
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py
index d01fcaad0d1e61be4a7d17e9f32aa1013a8b0f0f..67020d63273da5249fadd6aaaaf68929afe7bf17 100755
--- a/build/android/buildbot/bb_device_status_check.py
+++ b/build/android/buildbot/bb_device_status_check.py
@@ -256,8 +256,11 @@ def RestartUsb():
def KillAllAdb():
def GetAllAdb():
for p in psutil.process_iter():
- if 'adb' in p.name:
- yield p
+ try:
+ if 'adb' in p.name:
+ yield p
+ except psutil.error.NoSuchProcess:
+ pass
for sig in [signal.SIGTERM, signal.SIGQUIT, signal.SIGKILL]:
for p in GetAllAdb():
@@ -268,7 +271,10 @@ def KillAllAdb():
except psutil.error.NoSuchProcess:
pass
for p in GetAllAdb():
- print 'Unable to kill %d (%s [%s])' % (p.pid, p.name, ' '.join(p.cmdline))
+ try:
+ print 'Unable to kill %d (%s [%s])' % (p.pid, p.name, ' '.join(p.cmdline))
+ except psutil.error.NoSuchProcess:
+ pass
def main():
« 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