Skip to content

Commit 35fded9

Browse files
committed
Fix bmc default root pass
Signed-off-by: Ben Levi <belevi@nvidia.com>
1 parent f32bdd1 commit 35fded9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sonic_platform_base/bmc_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,4 +417,8 @@ def reset_root_password(self):
417417
ret: An integer return code indicating success (0) or failure
418418
msg: A string containing success message or error description
419419
"""
420-
return self._change_login_password(self._get_default_root_password(), BMCBase.ROOT_ACCOUNT)
420+
default_root_password = self._get_default_root_password()
421+
if not default_root_password:
422+
logger.log_error("BMC root account default password not found")
423+
return (RedfishClient.ERR_CODE_GENERIC_ERROR, "BMC root account default password not found")
424+
return self._change_login_password(default_root_password, BMCBase.ROOT_ACCOUNT)

0 commit comments

Comments
 (0)