aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/base.py
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2021-01-13 09:20:03 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-01-21 12:47:54 -0600
commit7b436148467559a967abffd7c8c2679c629194de (patch)
tree68059bf52c1754f0041181164e1958df426a2a2f /mpm/python/usrp_mpm/periph_manager/base.py
parenta2f10eed677861dfdb4a158c456a5e39302fe96e (diff)
downloaduhd-7b436148467559a967abffd7c8c2679c629194de.tar.gz
uhd-7b436148467559a967abffd7c8c2679c629194de.tar.bz2
uhd-7b436148467559a967abffd7c8c2679c629194de.zip
sim: Ignore mender artifact file on sim devices
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/base.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 3feb3452a..c09cde611 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -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"])