[autotest] Handle exceptions in rpm_client.set_power()

CrosHost has a try/except that assumes that calls to the RPM
infrastructure will raise instances of a subclass of
rpm_client.RemotePowerException.  rpm_client.set_power() makes
calls that may return other classes of exception.

This changes rpm_client.set_power() so that unexpected
exceptions are converted to instances of RemotePowerException.

BUG=chromium:420802
TEST=run `rpm_client.py -m chromeos1-fubar --state ON`, see RemotePowerException

Change-Id: Idd0ba88acffa727614bb82e252447cc743564235
Reviewed-on: https://chromium-review.googlesource.com/221797
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
1 file changed