Merge pull request #157 from DanAlbert/fix-none

Fix None dereference.
This commit is contained in:
C. Perreau 2020-09-27 19:10:31 +02:00 committed by GitHub
commit 0fe59efd72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1527,7 +1527,10 @@ class RunwayData:
ils: Optional[RadioFrequency] = None
try:
airfield = AIRFIELD_DATA[airport.name]
atc = airfield.atc.uhf
if airfield.atc is not None:
atc = airfield.atc.uhf
else:
atc = None
tacan = airfield.tacan
tacan_callsign = airfield.tacan_callsign
ils = airfield.ils_freq(runway)