Untitled

 avatar
unknown
plain_text
a year ago
364 B
8
Indexable
def remove_matching_modbus_entry(devices, new_entry_ip):
    # Iterate over the devices list
    for device in devices[:]:  
        if isinstance(device, ModbusEntry) and device.ip_address == new_entry_ip:
            # Remove the matching ModbusEntry from the devices list
            devices.remove(device)


remove_matching_modbus_entry(devices, new_entry_ip)
Editor is loading...
Leave a Comment