From eae92402bc3c3ca8c3472c69c071f189a035f4ec Mon Sep 17 00:00:00 2001 From: TheFGFSEagle Date: Thu, 1 Sep 2022 14:32:51 +0200 Subject: [PATCH] Fix minor syntax bugs --- scenery/aptdat2airportsxml.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scenery/aptdat2airportsxml.py b/scenery/aptdat2airportsxml.py index 0ac5bb3..e20e8a7 100644 --- a/scenery/aptdat2airportsxml.py +++ b/scenery/aptdat2airportsxml.py @@ -25,7 +25,7 @@ def get_icao_xml_path(icao, what): return f"{icao[0]}/{icao[1]}/{icao[2]}/{icao}.{what}.xml" class Parking: - def __init__(self, index, type, name, lon, lat, hdg, radius=7.5, pushback_route=False, airline_codes=[]): + def __init__(self, index, type, name, lon, lat, hdg, radius=7.5, pushback_route=-1, airline_codes=[]): self.index = index self.type = type self.name = name @@ -41,10 +41,15 @@ class Parking: return {"A": 7.5, "B": 14, "C": 18, "D": 26, "E": 33, "F": 40}[code] def __repr__(self): - return (f' \n') + s = (f' -1: + s += f' pushBackRoute="{self.pushback_route}"' + if len(self.airline_codes) > 0: + s += f' airlineCodes="{",".join(self.airline_codes)}"' + s += '/>\n' + return s class TaxiNode: def __init__(self, lon, lat, index): @@ -58,7 +63,7 @@ class TaxiNode: return self.on_runway != None def __repr__(self): - return (f' \n')