cleanup the airport configuration

This commit is contained in:
Sven Czarnian
2021-11-17 10:01:49 +01:00
parent 7fe1af1def
commit a9fc6bc701

View File

@@ -226,9 +226,7 @@ class Airport:
self.RunwayAssignmentsShall = {} self.RunwayAssignmentsShall = {}
self.RunwayAssignmentsShould = {} self.RunwayAssignmentsShould = {}
self.RunwayAssignmentsMay = {} self.RunwayAssignmentsMay = {}
self.MaxDelayShould = 10 self.MaxDelayMay = timedelta(minutes=10)
self.MaxDelayMay = 5
shouldFound = False
mayFound = False mayFound = False
for key in planning: for key in planning:
@@ -240,7 +238,6 @@ class Airport:
runway = self.findRunway(icao, key.replace('shouldassign', '').upper()) runway = self.findRunway(icao, key.replace('shouldassign', '').upper())
assignments = Airport.parseAssignment(planning[key]) assignments = Airport.parseAssignment(planning[key])
Airport.updateRunwayAssignment(self.RunwayAssignmentsShould, runway, assignments) Airport.updateRunwayAssignment(self.RunwayAssignmentsShould, runway, assignments)
shouldFound = True
elif True == key.startswith('mayassign'): elif True == key.startswith('mayassign'):
runway = self.findRunway(icao, key.replace('mayassign', '').upper()) runway = self.findRunway(icao, key.replace('mayassign', '').upper())
assignments = Airport.parseAssignment(planning[key]) assignments = Airport.parseAssignment(planning[key])
@@ -248,11 +245,6 @@ class Airport:
mayFound = True mayFound = True
# find the max delays # find the max delays
if True == shouldFound:
if 'maxdelayshould' not in planning:
sys.stderr.write('maxDelayShould needs to be defined')
sys.exit(-1)
self.MaxDelayShould = timedelta(minutes=int(planning['maxdelayshould']))
if True == mayFound: if True == mayFound:
if 'maxdelaymay' not in planning: if 'maxdelaymay' not in planning:
sys.stderr.write('maxDelaymay needs to be defined') sys.stderr.write('maxDelaymay needs to be defined')