Changeset 1034:4836f52b49cd for src/mlx/web.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/web.py
r1033 r1034 147 147 return flight 148 148 149 @staticmethod 150 def _convertFlightType(ft): 151 """Convert the in-database flight-type to one of our constants.""" 152 ft = int(ft) 153 if ft==0: 154 return const.FLIGHTTYPE_SCHEDULED 155 elif ft==1: 156 return const.FLIGHTTYPE_VIP 157 elif ft==2: 158 return const.FLIGHTTYPE_CHARTER 159 else: 160 return const.FLIGHTTYPE_SCHEDULED 161 149 162 def __init__(self, id = None): 150 163 """Construct a booked flight with the given ID.""" … … 295 308 self.mailWeight = int(bookedFlightData["mailWeight"]) 296 309 self.route = bookedFlightData["route"] 310 self.flightType = BookedFlight._convertFlightType(bookedFlightData["flightType"]) 297 311 298 312 def writeIntoFile(self, f):
Note:
See TracChangeset
for help on using the changeset viewer.