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

Fix for #336 - Divide-by-zero error for Attrib value=0 and has_usage #337

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

payerle
Copy link
Contributor

@payerle payerle commented Nov 10, 2021

This adds a try/except block in generate_guauge_data_from_usage() (why
the misspelling?) to catch for divide by zero errors. If value=0, we
set the percent used to 100% (arbitrary, but better than an exception)

…s_usage=True

This adds a try/except block in generate_guauge_data_from_usage() (why
the misspelling?) to catch for divide by zero errors.  If value=0, we
set the percent used to 100% (arbitrary, but better than an exception)
And a ValueError exception in generate_guauge_data_from_usage()
@aebruno aebruno merged commit 87804e5 into ubccr:master Dec 23, 2021
@aebruno
Copy link
Member

aebruno commented Dec 23, 2021

Thanks!

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.

2 participants