allow unset weather provider

This commit is contained in:
Sven Czarnian
2021-11-22 16:19:46 +01:00
parent 18577ebe9a
commit f021baf4cc
4 changed files with 13 additions and 6 deletions

View File

@@ -27,7 +27,10 @@ class Worker(Thread):
self.PerformanceData = performance
self.UpdateLock = Lock()
self.ReportQueue = {}
self.WeatherModel = WeatherModel(configuration.GaforId, weather)
if None != weather:
self.WeatherModel = WeatherModel(configuration.GaforId, weather)
else:
self.WeatherModel = WeatherModel(0, None)
self.RecedingHorizonControl = RecedingHorizonControl(configuration.RecedingHorizonControl)
self.Euroscope = euroscope