Skip to content

Commit

Permalink
Python3 syntax changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolás committed Oct 6, 2023
1 parent 2cb133c commit 65fba47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup/usr/share/issabel/privileged/detect_endpoints
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ def list_mac_ips(dbpool, netmask):
if dataready:
s = r.stdout.readline()
if s == '' and not running: break
m = re.search(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', s)
if m != None: ip = m.group(1)
m = re.search(r'MAC Address: (.*) \((.*)\)', s)
m = re.search(b'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', s)
if m != None: ip = m.group(1).decode('utf-8')
m = re.search(b'MAC Address: (.*) \((.*)\)', s)
if m != None:
mac = m.group(1)
mac = m.group(1).decode('utf-8')
if mac[:8] in macprefix:
try:
process_endpoint(dbpool, ip, mac, macprefix[mac[:8]])
Expand Down

0 comments on commit 65fba47

Please sign in to comment.