logging: Avoid possible multiplication by None

This commit is contained in:
James R. Barlow
2023-09-23 15:08:55 -07:00
parent d855f63985
commit a3a083c125
+5 -1
View File
@@ -71,7 +71,11 @@ class RichTqdmProgressAdapter:
)
self.unit_scale = unit_scale
self.progress_bar = self.progress.add_task(
desc, total=total * self.unit_scale, unit=unit
desc,
total=total * self.unit_scale
if total is not None and self.unit_scale is not None
else None,
unit=unit,
)
def __enter__(self):