mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #12226 from zexi/redfish-panic
fix(baremetal): avoid redfish resp nil cause panic
This commit is contained in:
@@ -177,6 +177,9 @@ func (r *SBaseRedfishClient) Probe(ctx context.Context) error {
|
||||
if r.IsDebug {
|
||||
log.Debugf("%s", resp.PrettyString())
|
||||
}
|
||||
if resp == nil {
|
||||
return errors.Errorf("Response is nil")
|
||||
}
|
||||
err = r.IRedfishDriver().ParseRoot(resp)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "r.IRedfishDriver().ParseRoot(resp)")
|
||||
|
||||
Reference in New Issue
Block a user