fix divide by 0 errors in --verbose output of progress tracking
This commit is contained in:
parent
ed199a0e3a
commit
ffa12177c1
1 changed files with 4 additions and 0 deletions
|
|
@ -1406,9 +1406,13 @@ def calculate_progress(config: ProjectConfig) -> None:
|
|||
self.objects_progress += 1
|
||||
|
||||
def code_frac(self) -> float:
|
||||
if self.code_total == 0:
|
||||
return 1.0
|
||||
return self.code_progress / self.code_total
|
||||
|
||||
def data_frac(self) -> float:
|
||||
if self.data_total == 0:
|
||||
return 1.0
|
||||
return self.data_progress / self.data_total
|
||||
|
||||
progress_units: Dict[str, ProgressUnit] = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue