2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Fix password change handling in EUREKA discovery

util.json_loads does not exist, so the PasswordChangeRequired flow
raised AttributeError on every 401, silently swallowed by the blanket
except. Use json.loads, which accepts the bytes body directly.
This commit is contained in:
Markus Hilger
2026-07-14 05:42:25 +02:00
parent 8057755b15
commit d8f4049115
@@ -21,6 +21,8 @@ sensor readings. It does NOT support IPMI, NIC configuration,
firmware update, or other BMC-specific operations.
"""
import asyncio
import json
import confluent.discovery.handlers.generic as generic
import confluent.util as util
import aiohmi.util.webclient as webclient
@@ -105,7 +107,7 @@ class NodeHandler(generic.NodeHandler):
elif status == 401:
self.trieddefault = True
try:
errinfo = util.json_loads(body)
errinfo = json.loads(body)
for msg in errinfo.get('@Message.ExtendedInfo', []):
if 'PasswordChangeRequired' in msg.get('MessageId', ''):
chgurl = msg.get('MessageArgs', [None])[0]