Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise right exception on set_iso #784

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Akrog
Copy link
Contributor

@Akrog Akrog commented Feb 18, 2025

There are a couple of places in the set_iso method where an exception is not raised, so later on an invalid exception is raised, such as:

Hit 'NoneType' object has no attribute 'code' when plugging iso http://10.45.225.105/sno-devin-sno.iso to host with url https://devin03.mgmt.lab.eng.brq2.redhat.com/redfish/v1/Systems/System.Embedded.1

That NoneType is referring to the code trying result.code when result has not been changed from the default because an exception had been risen.

This patch fixes this error by raising the exception when it's encountered.

There are a couple of places in the `set_iso` method where an exception
is not raised, so later on an invalid exception is raised, such as:

```
Hit 'NoneType' object has no attribute 'code' when plugging iso http://10.45.225.105/sno-devin-sno.iso to host with url https://devin03.mgmt.lab.eng.brq2.redhat.com/redfish/v1/Systems/System.Embedded.1
```

That `NoneType` is referring to the code trying `result.code` when
`result` has not been changed from the default because an exception had
been risen.

This patch fixes this error by raising the exception when it's
encountered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant