Explorar o código

cleanup the airport configuration

Sven Czarnian %!s(int64=3) %!d(string=hai) anos
pai
achega
a9fc6bc701
Modificáronse 1 ficheiros con 1 adicións e 9 borrados
  1. 1 9
      aman/config/Airport.py

+ 1 - 9
aman/config/Airport.py

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