mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
sim: Ignore mender artifact file on sim devices
This commit is contained in:
parent
a2f10eed67
commit
7b43614846
@ -169,7 +169,17 @@ class PeriphManagerBase(object):
|
||||
mboard_info["mpm_sw_version"] = version_string
|
||||
|
||||
mboard_info["fs_version"] = get_fs_version()
|
||||
mboard_info['mender_artifact'] = get_mender_artifact()
|
||||
# Mender artifacts are generally not present on a machine hosting
|
||||
# a simulated device--let it slide if not found on sim devices
|
||||
try:
|
||||
mboard_info['mender_artifact'] = get_mender_artifact()
|
||||
except FileNotFoundError:
|
||||
# Note that the simulated key will not be present for
|
||||
# non-simulated devices, hence the use of get()
|
||||
if mboard_info.get('simulated', '') == 'True':
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
for i,dboard_info in enumerate(dboard_infos):
|
||||
mboard_info["dboard_{}_pid".format(i)] = str(dboard_info["pid"])
|
||||
|
||||
@ -90,7 +90,8 @@ class sim(PeriphManagerBase):
|
||||
self.device_id = 1
|
||||
self.description = self.config.hardware.description
|
||||
self.mboard_info = {"type": self.config.hardware.uhd_device_type,
|
||||
"product": self.config.hardware.product}
|
||||
"product": self.config.hardware.product,
|
||||
"simulated": "True"}
|
||||
self.pids = {int(self.config.hardware.pid): self.config.hardware.product}
|
||||
# This uses the description, mboard_info, and pids
|
||||
super().__init__()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user