Ignore:
Timestamp:
03/14/22 09:58:58 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Updated the flight type handling (re #357)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pirep.py

    r1033 r1034  
    4242
    4343    _flightTypes = { const.FLIGHTTYPE_SCHEDULED : "SCHEDULED",
    44                      const.FLIGHTTYPE_OLDTIMER : "OT",
    4544                     const.FLIGHTTYPE_VIP : "VIP",
    46                      const.FLIGHTTYPE_CHARTER : "CHARTER" }
     45                     const.FLIGHTTYPE_CHARTER : "CHARTER",
     46                     const.FLIGHTTYPE_OLDTIMER : "OT" }
    4747
    4848    @staticmethod
     
    167167        self.arrivalRunway = flight.arrivalRunway.upper()
    168168
    169         self.flightType = flight.flightType
    170169        self.online = flight.online
    171170
     
    237236        self.arrivalRunway = pirepData["arrivalRunway"]
    238237
    239         self.flightType = PIREP.decodeFlightTypeText(pirepData["flightType"])
    240238        self.online = int(pirepData["online"])!=0
    241239
     
    300298    def flightTypeText(self):
    301299        """Get the text representation of the flight type."""
    302         return PIREP._flightTypes[self.flightType]
     300        return PIREP._flightTypes[self.bookedFlight.flightType]
    303301
    304302    @property
     
    399397        attrs["bagWeight"] = self.bagWeight
    400398        attrs["mailWeight"] = self.mailWeight
    401         attrs["flightType"] = self.flightTypeText
    402399        attrs["online"] = 1 if self.online else 0
    403400        attrs["blockTimeStart"] = self.blockTimeStartText
Note: See TracChangeset for help on using the changeset viewer.