aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-11-08 16:10:13 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:05 -0800
commit16da5da375a5f28f5ba55968b4d4610e3d259ddf (patch)
tree72cfdcd1f152e295ba83c92ffe88a9213aff3b1e /mpm/python
parenta972069f07e1cc5068ee5be7e9e31da39d46490b (diff)
downloaduhd-16da5da375a5f28f5ba55968b4d4610e3d259ddf.tar.gz
uhd-16da5da375a5f28f5ba55968b4d4610e3d259ddf.tar.bz2
uhd-16da5da375a5f28f5ba55968b4d4610e3d259ddf.zip
mpm: Remove leading _ from _get_device_info()
Use @norpc instead. This fixes some linting issues.
Diffstat (limited to 'mpm/python')
-rwxr-xr-xmpm/python/usrp_hwd.py4
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py3
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py2
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: