2
0
mirror of https://opendev.org/x/pyghmi synced 2026-05-18 04:07:19 +00:00

Merge "Fix redfish operation over ipv6 link local"

This commit is contained in:
Zuul
2021-11-09 19:44:14 +00:00
committed by Gerrit Code Review
+3 -1
View File
@@ -258,7 +258,9 @@ class Command(object):
if addrinf[0] == socket.AF_INET:
self._bmcv4ip = socket.inet_pton(addrinf[0], addrinf[-1][0])
elif addrinf[0] == socket.AF_INET6:
self._bmcv6ip = socket.inet_pton(addrinf[0], addrinf[-1][0])
theip = addrinf[-1][0]
theip = theip.split('%')[0]
self._bmcv6ip = socket.inet_pton(addrinf[0], theip)
self.wc.set_header('Accept', 'application/json')
self.wc.set_header('User-Agent', 'pyghmi')
self.wc.set_header('Accept-Encoding', 'gzip')