mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Check for empty package before estimating TOT.
Fixes https://github.com/Khopa/dcs_liberation/issues/1014.
This commit is contained in:
parent
b10e86e484
commit
b8e6c2fe78
@ -72,6 +72,9 @@ class TotEstimator:
|
|||||||
return startup_time
|
return startup_time
|
||||||
|
|
||||||
def earliest_tot(self) -> timedelta:
|
def earliest_tot(self) -> timedelta:
|
||||||
|
if not self.package.flights:
|
||||||
|
return timedelta(0)
|
||||||
|
|
||||||
earliest_tot = max(
|
earliest_tot = max(
|
||||||
(self.earliest_tot_for_flight(f) for f in self.package.flights)
|
(self.earliest_tot_for_flight(f) for f in self.package.flights)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user