- ifname=line.replace(" ","").split(":")[0]
- if ifname.find("lo")==0: continue
- if ifname.find("br")==0: continue
- if ifname.find("virbr")==0: continue
- if ifname.find("veth")==0: continue
- if ifname.find("tap")==0: continue
- if ifname.find("vif")==0: continue
- print ifname
+ ifname = line.replace(" ","").split(":")[0]
+ if ifname.startswith("lo"): continue
+ if ifname.startswith("br"): continue
+ if ifname.startswith("virbr"): continue
+ if ifname.startswith("veth"): continue
+ if ifname.startswith("tap"): continue
+ if ifname.startswith("vif"): continue
+ print(ifname)