Changeset 1034:4836f52b49cd for src/mlx/pirep.py
- Timestamp:
- 03/14/22 09:58:58 (2 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/pirep.py
r1033 r1034 42 42 43 43 _flightTypes = { const.FLIGHTTYPE_SCHEDULED : "SCHEDULED", 44 const.FLIGHTTYPE_OLDTIMER : "OT",45 44 const.FLIGHTTYPE_VIP : "VIP", 46 const.FLIGHTTYPE_CHARTER : "CHARTER" } 45 const.FLIGHTTYPE_CHARTER : "CHARTER", 46 const.FLIGHTTYPE_OLDTIMER : "OT" } 47 47 48 48 @staticmethod … … 167 167 self.arrivalRunway = flight.arrivalRunway.upper() 168 168 169 self.flightType = flight.flightType170 169 self.online = flight.online 171 170 … … 237 236 self.arrivalRunway = pirepData["arrivalRunway"] 238 237 239 self.flightType = PIREP.decodeFlightTypeText(pirepData["flightType"])240 238 self.online = int(pirepData["online"])!=0 241 239 … … 300 298 def flightTypeText(self): 301 299 """Get the text representation of the flight type.""" 302 return PIREP._flightTypes[self. flightType]300 return PIREP._flightTypes[self.bookedFlight.flightType] 303 301 304 302 @property … … 399 397 attrs["bagWeight"] = self.bagWeight 400 398 attrs["mailWeight"] = self.mailWeight 401 attrs["flightType"] = self.flightTypeText402 399 attrs["online"] = 1 if self.online else 0 403 400 attrs["blockTimeStart"] = self.blockTimeStartText
Note:
See TracChangeset
for help on using the changeset viewer.