aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/sysfs_gpio.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-31 18:19:30 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:58 -0800
commit2bd564ca225cbf1d02eb5025315bb67fe458ba00 (patch)
treed295f722df18cad84a7aa9db6d7f084dfa6b4338 /mpm/python/usrp_mpm/sysfs_gpio.py
parentd16d342be2dee7fef1f798349eba211cce0f27f9 (diff)
downloaduhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.tar.gz
uhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.tar.bz2
uhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.zip
mpm: Replaced xrange with range for better Python future-proofing
Diffstat (limited to 'mpm/python/usrp_mpm/sysfs_gpio.py')
-rw-r--r--mpm/python/usrp_mpm/sysfs_gpio.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/sysfs_gpio.py b/mpm/python/usrp_mpm/sysfs_gpio.py
index fd06ad10d..fa07921d8 100644
--- a/mpm/python/usrp_mpm/sysfs_gpio.py
+++ b/mpm/python/usrp_mpm/sysfs_gpio.py
@@ -121,7 +121,7 @@ class SysFSGPIO(object):
E.g., if use_mask & 0x1 is True, it makes sure that 'gpioXXX' is exported.
Also sets the DDRs.
"""
- gpio_list = [x for x in xrange(n_gpio) if (1<<x) & use_mask]
+ gpio_list = [x for x in range(n_gpio) if (1<<x) & use_mask]
self.log.trace("Initializing {} GPIOs...".format(len(gpio_list)))
for gpio_idx in gpio_list:
gpio_num = base + gpio_idx