diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-08 13:21:36 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-08-22 10:35:13 -0700 |
commit | 78f453f8b59b2c4995e2aab584f3022715a2caaf (patch) | |
tree | 8ba574667d4a2bef7dd41bef48b16e03392623d0 /mpm | |
parent | 916f318badcadb25810b11bfc2a91e792378015f (diff) | |
download | uhd-78f453f8b59b2c4995e2aab584f3022715a2caaf.tar.gz uhd-78f453f8b59b2c4995e2aab584f3022715a2caaf.tar.bz2 uhd-78f453f8b59b2c4995e2aab584f3022715a2caaf.zip |
mpm: mg: Only import AD9371 API calls if not yet on Magnesium
This will avoid importing API calls from the self.mykonos object onto
the Magnesium class if the Magnesium class already has such a method.
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/magnesium.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index 2d2e7aa60..13e621414 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -220,7 +220,7 @@ class Magnesium(BfrfsEEPROM, DboardManagerBase): " Export a method object, including docstring " meth_obj = getattr(obj, method) def func(*args): - " Functor for storing docstring too " + " Functor for storing docstring to " return meth_obj(*args) func.__doc__ = meth_obj.__doc__ return func @@ -228,7 +228,8 @@ class Magnesium(BfrfsEEPROM, DboardManagerBase): for method in [ x for x in dir(self.mykonos) if not x.startswith("_") and \ - callable(getattr(self.mykonos, x))]: + callable(getattr(self.mykonos, x)) \ + and not hasattr(self, x)]: self.log.trace("adding {}".format(method)) setattr(self, method, export_method(myk, method)) |