[autotest] print out the original exception when running update
The original exception of running update is helpful for debug. Log it
out.
BUG=None
TEST=Unittest
Change-Id: I909f882bc091cbffcbc45c301d8056d2753d02aa
Reviewed-on: https://chromium-review.googlesource.com/336720
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Commit-Queue: Shuqian Zhao <shuqianz@chromium.org>
diff --git a/client/common_lib/cros/autoupdater.py b/client/common_lib/cros/autoupdater.py
index 00594db..2c1e783 100644
--- a/client/common_lib/cros/autoupdater.py
+++ b/client/common_lib/cros/autoupdater.py
@@ -174,9 +174,11 @@
self.host.run(**run_args)
except (error.AutoservSshPermissionDeniedError,
error.AutoservSSHTimeout) as e:
+ logging.exception(e)
err_msg += 'SSH reports an error: %s' % type(e).__name__
to_raise = RootFSUpdateError(err_msg)
except error.AutoservRunError as e:
+ logging.exception(e)
# Check if exit code is 255, if so it's probably a generic SSH error
result = e.args[1]
if result.exit_status == 255:
@@ -191,7 +193,6 @@
err_msg += ('Update failed. Returned update_engine error code: '
'%s. Reported error: %s' %
(self.get_last_update_error(), type(e).__name__))
- logging.error(e)
to_raise = RootFSUpdateError(err_msg)
except Exception as e:
to_raise = e