From 8426d7cd30a6c8e95022bf3fcd35b5928ce122d7 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Mon, 15 Nov 2021 21:14:31 +0100 Subject: [PATCH] rename the configuration flag --- aman/config/AirportSequencing.py | 2 +- app.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aman/config/AirportSequencing.py b/aman/config/AirportSequencing.py index a9d285f..ddf59de 100644 --- a/aman/config/AirportSequencing.py +++ b/aman/config/AirportSequencing.py @@ -13,7 +13,7 @@ class AirportSequencing: self.ActiveArrivalRunways = [] self.RunwayDependencies = [] self.LastUpdateTimestamp = dt.utcfromtimestamp(int(time.time())).replace(tzinfo = pytz.UTC) - self.UseMustShallMay = True + self.UseShallShouldMay = True def clearData(self): self.ActiveArrivalRunways.clear() diff --git a/app.py b/app.py index 0b04076..3f94468 100644 --- a/app.py +++ b/app.py @@ -54,7 +54,7 @@ def configuration(icao): dictionary = { 'airport' : airport.Icao, - 'useMustShallMay' : config.UseMustShallMay, + 'useShallShouldMay' : config.UseShallShouldMay, 'activeRunways' : config.ActiveArrivalRunways, 'dependentRunways' : dependencies } @@ -93,15 +93,15 @@ def configure(): return Response('{}', status=404, mimetype='application/json') # check that all top-level information are available - if 'useMustShallMay' not in data or 'activeRunways' not in data or 'dependentRunways' not in data: + if 'useShallShouldMay' not in data or 'activeRunways' not in data or 'dependentRunways' not in data: return Response('{}', status=404, mimetype='application/json') - if False == isinstance(data['useMustShallMay'], bool) or 0 == len(data['activeRunways']): + if False == isinstance(data['useShallShouldMay'], bool) or 0 == len(data['activeRunways']): return Response('{}', status=404, mimetype='application/json') # create the toplevel information config = AirportSequencing(airport.Icao) config.Airport = data['airport'].upper() - config.UseMustShallMay = data['useMustShallMay'] + config.UseShallShouldMay = data['useShallShouldMay'] # parse the active runways for activeRunway in data['activeRunways']: