diff options
Diffstat (limited to 'mpm/python/usrp_mpm/sysfs_gpio.py')
-rw-r--r-- | mpm/python/usrp_mpm/sysfs_gpio.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mpm/python/usrp_mpm/sysfs_gpio.py b/mpm/python/usrp_mpm/sysfs_gpio.py index 6473d87ee..ea423dc00 100644 --- a/mpm/python/usrp_mpm/sysfs_gpio.py +++ b/mpm/python/usrp_mpm/sysfs_gpio.py @@ -19,7 +19,6 @@ Access to GPIOs mapped into the PS via sysfs """ import os -from builtins import range from builtins import object import pyudev from .mpmlog import get_logger @@ -35,11 +34,11 @@ def get_all_gpio_devs(): """ try: context = pyudev.Context() - gpios = [device.sys_name.encode('ascii') + gpios = [device.sys_name for device in context.list_devices(subsystem="gpio") if os.path.exists(os.path.join( # udev probably has better ways to do this GPIO_SYSFS_BASE_DIR, - device.sys_name.encode('ascii'), + device.sys_name, GPIO_SYSFS_LABELFILE )) ] |