| Index: devil/devil/android/device_utils.py
|
| diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py
|
| index 322b9d114a63b592132836cd02f0d9f18ff19e49..0d5fa9f2e53f1285119ddf9af23b5ea4d2e95fb6 100644
|
| --- a/devil/devil/android/device_utils.py
|
| +++ b/devil/devil/android/device_utils.py
|
| @@ -1055,11 +1055,11 @@ class DeviceUtils(object):
|
| else:
|
| return output
|
|
|
| - def _RunPipedShellCommand(self, script, **kwargs):
|
| + def _RunPipedShellCommand(self, script, check_return=True, **kwargs):
|
| PIPESTATUS_LEADER = 'PIPESTATUS: '
|
|
|
| script += '; echo "%s${PIPESTATUS[@]}"' % PIPESTATUS_LEADER
|
| - kwargs.update(shell=True, check_return=True)
|
| + kwargs.update(shell=True)
|
| output = self.RunShellCommand(script, **kwargs)
|
| pipestatus_line = output[-1]
|
|
|
| @@ -1072,7 +1072,7 @@ class DeviceUtils(object):
|
| output = output[:-1]
|
| statuses = [
|
| int(s) for s in pipestatus_line[len(PIPESTATUS_LEADER):].split()]
|
| - if any(statuses):
|
| + if check_return and any(statuses):
|
| raise device_errors.AdbShellCommandFailedError(
|
| script, output, status=statuses,
|
| device_serial=self.serial)
|
| @@ -1370,8 +1370,8 @@ class DeviceUtils(object):
|
| logging.error(
|
| 'Hit EBUSY while attempting to make missing directories.')
|
| logging.error('lsof output:')
|
| - for l in self._RunPipedShellCommand(
|
| - 'lsof | grep %s' % cmd_helper.SingleQuote(m.group(1))):
|
| + cmd = 'lsof | grep %s' % cmd_helper.SingleQuote(m.group(1))
|
| + for l in self._RunPipedShellCommand(cmd, check_return=False):
|
| logging.error(' %s', l)
|
| raise
|
| self._PushFilesImpl(host_device_tuples, all_changed_files)
|
|
|