mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 21:27:54 +00:00
Protect TrickOps progres bar from divide by zero (#1664)
Closes #1663 Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
This commit is contained in:
parent
2ac342cfc5
commit
e184db0eb8
@ -1540,6 +1540,9 @@ class SingleRun(Job):
|
||||
self._sim_time(), self._average_speed())
|
||||
|
||||
def _connected_bar(self):
|
||||
if self._terminate_time.value <= 0.0:
|
||||
progress = 0.0
|
||||
else:
|
||||
progress = self._tics.value / self._terminate_time.value
|
||||
return create_progress_bar(
|
||||
progress, '{0:.1f}%'.format(100 * progress))
|
||||
|
Loading…
Reference in New Issue
Block a user