Skip to content

return early with a log message if badges model HTTP request has an error#321

Open
MoralCode wants to merge 1 commit into
mainfrom
fix/badges_model_nonetype
Open

return early with a log message if badges model HTTP request has an error#321
MoralCode wants to merge 1 commit into
mainfrom
fix/badges_model_nonetype

Conversation

@MoralCode
Copy link
Copy Markdown
Contributor

Description
This needs a larger refactor at a later time, this is just a small improvement to prevent a crash when data cannot be found by adding a simple none check that skips the problematic code with a return call.

This PR fixes #318

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

… found

This needs a larger refactor at a later time, this is just a small improvement to prevent a crash when data cannot be found.

Signed-off-by: Adrian Edwards <adredwar@redhat.com>

try:
response_data = response.json()
except:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0702: No exception type(s) specified (bare-except)

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.

Core:collect_linux_badge_info error: AttributeError("'NoneType' object has no attribute 'text'")

1 participant