Make port unmapping errors non fatal.
In some cases port unmapping can fail. This should not be fatal nor need client recovery code. This can happen when multiple instances of the Forwarder class try to map/unmap a same port. While the host_forwarder daemon supports that, the python wrapper didn't. R=bulach@chromium.org Review URL: https://codereview.chromium.org/18714004 git-svn-id: http://src.chromium.org/svn/trunk/src/build@210306 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
c664eec31b
Коммит
982dbd5ac1
|
@ -128,7 +128,7 @@ class Forwarder(object):
|
||||||
(exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
|
(exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
|
||||||
[self._host_forwarder_path] + redirection_command)
|
[self._host_forwarder_path] + redirection_command)
|
||||||
if exit_code != 0:
|
if exit_code != 0:
|
||||||
raise Exception('%s exited with %d:\n%s' % (
|
logging.error('%s exited with %d:\n%s' % (
|
||||||
self._host_forwarder_path, exit_code, '\n'.join(output)))
|
self._host_forwarder_path, exit_code, '\n'.join(output)))
|
||||||
host_port = self._device_to_host_port_map[device_port]
|
host_port = self._device_to_host_port_map[device_port]
|
||||||
del self._device_to_host_port_map[device_port]
|
del self._device_to_host_port_map[device_port]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче