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

Unified Diff: build/android/pylib/forwarder.py

Issue 12640006: [android] Improve reverse forwarder error handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move check to forwarder.py Created 7 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: build/android/pylib/forwarder.py
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py
index 0c443959217b873fb900e9ff453a759e8752e0a9..5a527fe23225b7d8b620eb10c06b0d290f4fec0c 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -88,8 +88,14 @@ class Forwarder(object):
'Failed to start device forwarder:\n%s' % '\n'.join(output))
for redirection_command in redirection_commands:
- (exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
- [self._host_forwarder_path, redirection_command])
+ try:
+ (exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
+ [self._host_forwarder_path, redirection_command])
+ except OSError as e:
+ if e.errno == 2:
+ raise Exception('Unable to start host forwarder. Make sure you have '
+ 'built host_forwarder.')
+ else: raise
if exit_code != 0:
raise Exception('%s exited with %d:\n%s' % (
self._host_forwarder_path, exit_code, '\n'.join(output)))
« 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