def getAllDevices(): """Return a list of Device objects for all devices in the system.""" from _ped import device_probe_all from _ped import device_get_next lst = [] device = None device_probe_all() while True: try: if not device: device = device_get_next() else: device = device_get_next(device) lst.append(Device(PedDevice=device)) except IndexError: return lst
def getAllDevices(): """Return a list of Device objects for all devices in the system.""" from _ped import device_probe_all from _ped import device_get_next lst = [] device = None device_probe_all() while True: try: if not device: device = device_get_next() else: device = device_get_next(device) lst.append(Device(PedDevice=device)) except IndexError: return lst