def _get_serial_ports(self): ports = [""] for port, desc, hwid in sorted(list_ports.comports()): ports.append(port) return ports