Skip to content

fix(util): division by zero when logging progress in some cases#980

Merged
jansegre merged 1 commit intomasterfrom
fix/division-by-zero-on-progress
Mar 21, 2024
Merged

fix(util): division by zero when logging progress in some cases#980
jansegre merged 1 commit intomasterfrom
fix/division-by-zero-on-progress

Conversation

@jansegre
Copy link
Copy Markdown
Member

Motivation

When testing #938 I got a division by zero error. I haven't debugged if the situation is realistic, but either way it seems to be better to handle the case where the denominator is 0.

Acceptance Criteria

  • Handle the case where progress_ == 0 by simply doing remaining_time = '?'

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@jansegre jansegre self-assigned this Mar 20, 2024
@jansegre jansegre requested a review from msbrogli as a code owner March 20, 2024 23:02
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 85.03%. Comparing base (7bcc669) to head (f273716).

Files Patch % Lines
hathor/util.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #980      +/-   ##
==========================================
- Coverage   85.09%   85.03%   -0.06%     
==========================================
  Files         294      294              
  Lines       22798    22800       +2     
  Branches     3434     3435       +1     
==========================================
- Hits        19400    19389      -11     
- Misses       2712     2725      +13     
  Partials      686      686              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msbrogli msbrogli requested a review from glevco March 21, 2024 16:24
@jansegre jansegre merged commit 74b7251 into master Mar 21, 2024
@jansegre jansegre deleted the fix/division-by-zero-on-progress branch March 21, 2024 20:15
@jansegre jansegre mentioned this pull request Apr 5, 2024
2 tasks
@jansegre jansegre mentioned this pull request May 8, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants