blob: 61443064cd667b66a5f9cbf6ddb2aa6999e8cef4 [file] [log] [blame]
from moblab_common.dut_connector import (
MoblabDUTConnector,
MoblabDUTConnectorException,
)
class MoblabDUTConnectorForFwupd(MoblabDUTConnector):
def get_peripheral_information(self, ip_address):
(host, stdout, stderr, exit_code) = self.run_command_on_ips(
"fwupdmgr get-devices --json", [ip_address]
)[0]
if exit_code != 0:
raise MoblabDUTConnectorException(
f"not able to retrieve peripheral information. Error: {stderr}"
)
return stdout