aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/e31x.py15
-rw-r--r--mpm/python/usrp_mpm/periph_manager/e320.py10
2 files changed, 11 insertions, 14 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/e31x.py b/mpm/python/usrp_mpm/periph_manager/e31x.py
index e7da81ca5..dc6e6be21 100644
--- a/mpm/python/usrp_mpm/periph_manager/e31x.py
+++ b/mpm/python/usrp_mpm/periph_manager/e31x.py
@@ -8,7 +8,6 @@
E310 implementation module
"""
-from __future__ import print_function
import copy
import re
from six import itervalues
@@ -411,9 +410,9 @@ class e31x(ZynqComponents, PeriphManagerBase):
Load all overlays required to go into idle power savings mode.
"""
idle_overlay = self.get_idle_dt_overlay(self.device_info)
- self.log.debug("Motherboard requests device tree overlay for Idle power savings mode: {}".format(
- idle_overlay
- ))
+ self.log.debug(
+ "Motherboard requests device tree overlay for Idle power savings mode: {}"
+ .format(idle_overlay))
dtoverlay.apply_overlay_safe(idle_overlay)
def remove_idle_overlay(self):
@@ -504,8 +503,8 @@ class e31x(ZynqComponents, PeriphManagerBase):
if xport_type == "udp":
return self._xport_mgrs[xport_type].get_chdr_link_options(
self.mboard_info['rpc_connection'])
- else:
- return self._xport_mgrs[xport_type].get_chdr_link_options()
+ # else:
+ return self._xport_mgrs[xport_type].get_chdr_link_options()
###########################################################################
# Device info
@@ -727,7 +726,7 @@ class e31x(ZynqComponents, PeriphManagerBase):
"""
return self.mboard_info
- def set_mb_eeprom(self, eeprom_vals):
+ def set_mb_eeprom(self, _eeprom_vals):
"""
See PeriphManagerBase.set_mb_eeprom() for docs.
"""
@@ -743,7 +742,7 @@ class e31x(ZynqComponents, PeriphManagerBase):
db_eeprom_data = copy.copy(self.dboard.device_info)
return db_eeprom_data
- def set_db_eeprom(self, dboard_idx, eeprom_data):
+ def set_db_eeprom(self, _dboard_idx, _eeprom_data):
"""
See PeriphManagerBase.set_db_eeprom() for docs.
"""
diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py
index 439f6cb58..0d55e56ba 100644
--- a/mpm/python/usrp_mpm/periph_manager/e320.py
+++ b/mpm/python/usrp_mpm/periph_manager/e320.py
@@ -7,11 +7,10 @@
E320 implementation module
"""
-from __future__ import print_function
import bisect
import copy
import re
-import threading
+from functools import partial
from six import iteritems, itervalues
from usrp_mpm.components import ZynqComponents
from usrp_mpm.dboard_manager import Neon
@@ -153,7 +152,6 @@ class e320(ZynqComponents, PeriphManagerBase):
self._time_source = None
self._gpsd = None
self.dboard = self.dboards[E320_DBOARD_SLOT_IDX]
- from functools import partial
for sensor_name, sensor_cb_name in self.mboard_sensor_callback_map.items():
if sensor_name[:5] == 'temp_':
setattr(self, sensor_cb_name, partial(self.get_temp_sensor, sensor_name))
@@ -372,8 +370,8 @@ class e320(ZynqComponents, PeriphManagerBase):
if xport_type == "udp":
return self._xport_mgrs[xport_type].get_chdr_link_options(
self.mboard_info['rpc_connection'])
- else:
- return self._xport_mgrs[xport_type].get_chdr_link_options()
+ # else:
+ return self._xport_mgrs[xport_type].get_chdr_link_options()
###########################################################################
# Device info
@@ -455,7 +453,7 @@ class e320(ZynqComponents, PeriphManagerBase):
def get_ref_clock_freq(self):
" Returns the currently active reference clock frequency"
clock_source = self.get_clock_source()
- if clock_source == "internal" or clock_source == "gpsdo":
+ if clock_source in ("internal", "gpsdo"):
return E320_DEFAULT_INT_CLOCK_FREQ
# elif clock_source == "external":
return self._ext_clock_freq