Check for empty package before estimating TOT.

Fixes https://github.com/Khopa/dcs_liberation/issues/1014.
This commit is contained in:
Marcos Sigueros Fernández
2021-05-03 20:01:41 +02:00
committed by GitHub
parent b10e86e484
commit b8e6c2fe78

View File

@@ -72,6 +72,9 @@ class TotEstimator:
return startup_time
def earliest_tot(self) -> timedelta:
if not self.package.flights:
return timedelta(0)
earliest_tot = max(
(self.earliest_tot_for_flight(f) for f in self.package.flights)
)