We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f32bdd1 commit 35fded9Copy full SHA for 35fded9
sonic_platform_base/bmc_base.py
@@ -417,4 +417,8 @@ def reset_root_password(self):
417
ret: An integer return code indicating success (0) or failure
418
msg: A string containing success message or error description
419
"""
420
- return self._change_login_password(self._get_default_root_password(), BMCBase.ROOT_ACCOUNT)
+ 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