Sep-04-2019, 09:13 AM
issue found in below code, now its resolved.
with open('dslamips.txt') as ipdatafile: for sr_no, line in enumerate(ipdatafile, start=1): for ips in dslamip_list: to_bematch_ip = line.strip().split(' ')[2] if ips == to_bematch_ip: dslamInterface = "gigabitEthernet "+(line.strip().split(' ')[-1].strip()[len("GigabitEthernet"):]) insert_DSLAM_dataInDB(dslamInterface,ips) #print("ip={} {} {}".format(ips,sr_no,line))