diff options
-rwxr-xr-x | mpm/python/usrp_hwd.py | 4 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/base.py | 3 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/rpc_server.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py index 48af28d36..90f865da0 100755 --- a/mpm/python/usrp_hwd.py +++ b/mpm/python/usrp_hwd.py @@ -123,8 +123,8 @@ def main(): log.info("Spawning periph manager...") mgr = periph_manager(args) discovery_info = { - "type": mgr._get_device_info()["type"], - "serial": mgr._get_device_info()["serial"] + "type": mgr.get_device_info().get("type", "n/a"), + "serial": mgr.get_device_info().get("serial", "n/a") } if args.init_only: mgr.init(args.default_args) diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index a49d39206..3f456fc96 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -385,7 +385,8 @@ class PeriphManagerBase(object): """ return dtoverlay.list_overlays() - def _get_device_info(self): + @no_rpc + def get_device_info(self): """ return the mboard_info dict and add a claimed field """ diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py index 3ba7e2c01..7d7fe1758 100644 --- a/mpm/python/usrp_mpm/rpc_server.py +++ b/mpm/python/usrp_mpm/rpc_server.py @@ -314,7 +314,7 @@ class MPMServer(RPCServer): get device information This is as safe method which can be called without a claim on the device """ - info = self.periph_manager._get_device_info() + info = self.periph_manager.get_device_info() if self.client_host in ["127.0.0.1", "::1"]: info["connection"] = "local" else: |