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

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

Issue 385733002: Make KillAllAdb robust to AccessDenied exceptions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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 1a238de9a054febd12cfde75b76b53d6016eaf5e..228c48162404d3962179f7e954d0fa1e84d3b2d0 100755
--- a/build/android/buildbot/bb_device_status_check.py
+++ b/build/android/buildbot/bb_device_status_check.py
@@ -246,7 +246,7 @@ def KillAllAdb():
try:
if 'adb' in p.name:
yield p
- except psutil.error.NoSuchProcess:
+ except (psutil.error.NoSuchProcess, psutil.error.AccessDenied):
pass
for sig in [signal.SIGTERM, signal.SIGQUIT, signal.SIGKILL]:
@@ -255,12 +255,12 @@ def KillAllAdb():
print 'kill %d %d (%s [%s])' % (sig, p.pid, p.name,
' '.join(p.cmdline))
p.send_signal(sig)
- except psutil.error.NoSuchProcess:
+ except (psutil.error.NoSuchProcess, psutil.error.AccessDenied):
pass
for p in GetAllAdb():
try:
print 'Unable to kill %d (%s [%s])' % (p.pid, p.name, ' '.join(p.cmdline))
- except psutil.error.NoSuchProcess:
+ except (psutil.error.NoSuchProcess, psutil.error.AccessDenied):
pass
« 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