cros_build_lib: RunCommandError: avoid use of result
The result property already has all of its properties split out into
RunCommandError directly, so there's no need for this thing. Plus,
the subprocess APIs don't have anything similar. Avoid use of it in
most places.
BUG=b:187789262
TEST=CQ passes
Change-Id: I257f8868e274bbfe5549df0ca27078e288fa2601
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3838862
Commit-Queue: Lizzy Presland <zland@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Lizzy Presland <zland@google.com>
diff --git a/cli/deploy.py b/cli/deploy.py
index d2a9964..3ae3525 100644
--- a/cli/deploy.py
+++ b/cli/deploy.py
@@ -386,7 +386,7 @@
result = device.GetAgent().RemoteSh(['python'], remote_sudo=True,
input=get_vartree_script)
except cros_build_lib.RunCommandError as e:
- logging.error('Cannot get target vartree:\n%s', e.result.stderr)
+ logging.error('Cannot get target vartree:\n%s', e.stderr)
raise
try:
@@ -1051,8 +1051,7 @@
try:
device.run(['dlcservice_util', '--uninstall', '--id=%s' % dlc_id])
except cros_build_lib.RunCommandError as e:
- logging.info('Failed to uninstall DLC:%s. Continue anyway.',
- e.result.stderr)
+ logging.info('Failed to uninstall DLC:%s. Continue anyway.', e.stderr)
except Exception:
logging.error('Failed to uninstall DLC.')
raise