Skip to content

Bugfix none type#1035

Merged
jujubot merged 5 commits intojuju:2.9from
Aflynn50:bugfix-NoneType
Mar 22, 2024
Merged

Bugfix none type#1035
jujubot merged 5 commits intojuju:2.9from
Aflynn50:bugfix-NoneType

Conversation

@Aflynn50
Copy link
Copy Markdown
Contributor

Description

<Please add why this change is needed and what it does.>
Fix for #1028
The logger is not passed to calls of utils.run_with_interupt from model.py and controller.py. The default value is None, so when it is later used we get the error.
<Fixes: >

QA Steps

Added a raise Exception("my random exception") to the Next method of ModelSummeryWatcherFacade. This is hit by the run_with_interupt in controller and we can observe that when we run the file modelsummaries.py, if the log arguments added in this PR are not there then we get the None Type error and if they are there, we do not.

Jira: JUJU-5610

@Aflynn50 Aflynn50 requested a review from cderici March 20, 2024 23:05
Copy link
Copy Markdown
Contributor

@cderici cderici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the CI is unrelated, and will be fixed soon by the recent changes.

Can we also take care of these warnings as a drive-by, I fixed it in 3.x, and I thought I back-ported it, but looks like it fell through the cracks. Feel free to just cherry-pick those into this one or open another PR either is fine 👍

Thanks for the fix!

@Aflynn50
Copy link
Copy Markdown
Contributor Author

/merge

@jujubot jujubot merged commit 0d1d0a8 into juju:2.9 Mar 22, 2024
jujubot added a commit that referenced this pull request Mar 25, 2024
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.

3 participants