Skip to content

Commit

Permalink
fix: make parse_arp position agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
Slenderman00 committed May 23, 2024
1 parent 2206edf commit e714d5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/nav/ipdevpoll/plugins/paloaltoarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ def parse_arp(arp):
arps = []

root = ET.fromstring(arp)
entries = root[0][4]
entries = root.find("result").find("entries")
for entry in entries:
status = entry[0].text
ip = entry[1].text
mac = entry[2].text
status = entry.find("status").text
ip = entry.find("ip").text
mac = entry.find("mac").text
if status.strip() != "i":
if mac != "(incomplete)":
arps.append(('ifindex', IP(ip), mac))
Expand Down

0 comments on commit e714d5a

Please sign in to comment.