Advertisement
Guest User

Untitled

a guest
Jul 18th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. for l in vlans.split("\n"):
  2. match = rx_line.match(l.strip())
  3. if match:
  4. try:
  5. r.append({
  6. "vlan_id": match.group("vlan_id"),
  7. "mac": match.group("mac"),
  8. "interfaces": [match.group("interfaces")],
  9. "type": {"Dynamic": "D"}[match.group("type")],
  10. })
  11. except KeyError:
  12. continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement