Changeset 919:2ce8ca39525b for src/mlx/pirep.py
- Timestamp:
- 03/24/19 08:15:59 (5 years ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/pirep.py
r856 r919 1 1 2 from util import utf2unicode3 from flight import Flight4 5 import const6 import cPickle as pickle2 from .util import utf2unicode 3 from .flight import Flight 4 5 from . import const 6 import pickle as pickle 7 7 import calendar 8 8 import datetime … … 65 65 def decodeFlightTypeText(s): 66 66 """Decode the given flight type text.""" 67 for (flighType, text) in PIREP._flightTypes.ite ritems():67 for (flighType, text) in PIREP._flightTypes.items(): 68 68 if s==text: 69 69 return flighType … … 124 124 pirep.mailWeight = pirep.bookedFlight.mailWeight 125 125 return pirep 126 except Exception ,e:127 print 128 utf2unicode(str(e))) 126 except Exception as e: 127 print("Failed loading PIREP from %s: %s" % (path, 128 utf2unicode(str(e)))) 129 129 return None 130 130 … … 367 367 pickle.dump(self, f) 368 368 return None 369 except Exception ,e:369 except Exception as e: 370 370 error = utf2unicode(str(e)) 371 print u"Failed saving PIREP to %s: %s" % (path, error)371 print("Failed saving PIREP to %s: %s" % (path, error)) 372 372 return error 373 373
Note:
See TracChangeset
for help on using the changeset viewer.