Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Заменить вот это
- for l in vlans.split("\n"):
- match = rx_line.match(l.strip())
- if match:
- r.append({
- "vlan_id": match.group("vlan_id"),
- "mac": match.group("mac"),
- "interfaces": [match.group("interfaces")],
- "type": {"Dynamic": "D"}[match.group("type")],
- })
- На вот это
- for l in vlans.split("\n"):
- match = rx_line.match(l.strip())
- if match:
- try:
- r.append({
- "vlan_id": match.group("vlan_id"),
- "mac": match.group("mac"),
- "interfaces": [match.group("interfaces")],
- "type": {"Dynamic": "D"}[match.group("type")],
- })
- except KeyError:
- continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement