split the creation and the acquire-call

This commit is contained in:
Sven Czarnian
2021-11-12 20:12:41 +01:00
parent d1536804a4
commit feb4f85dac

View File

@@ -63,6 +63,9 @@ class AMAN:
self.WebUi = WebUI()
self.WebUi.acquire(self.SystemConfig.Server, self)
# create the EuroScope receiver
self.Receiver = Euroscope()
# find the airport configurations and create the workers
airportsPath = os.path.join(os.path.join(configPath, 'airports'), '*.ini')
for file in glob.glob(airportsPath):
@@ -77,8 +80,7 @@ class AMAN:
self.Workers.append(worker)
print('Started worker for ' + icao)
# create the EuroScope receiver
self.Receiver = Euroscope()
# initialize the receiver
self.Receiver.acquire(configPath, self.SystemConfig.Server, self)
def release(self):