def __init__(self): self.ports = [p for p, _, _ in serial_link.list_ports()]
def __init__(self): try: self.ports = [p for p, _, _ in serial_link.list_ports()] except TypeError: pass