Untitled

Anonymous
plain_text
03/18/2024 6:05 PM
488 B
19
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