Fix compatibility with python2

Change-Id: I8dba48cd9724467227c50cfeba7baa96b6e5970f
This commit is contained in:
Jarrod Johnson 2023-05-26 11:45:24 -04:00
parent ee9c06138b
commit ab53a6cc3b
1 changed files with 1 additions and 1 deletions

View File

@ -907,7 +907,7 @@ class Command(object):
ip6gd = bytearray(ip6g['data'])
if ip6gd[0] != 0x11:
raise Exception('Unsupported reply')
gwa = socket.inet_ntop(socket.AF_INET6, ip6gd[1:17])
gwa = socket.inet_ntop(socket.AF_INET6, bytes(ip6gd[1:17]))
retdata['static_gateway'] = gwa
return retdata