Ignore:
Timestamp:
03/24/19 08:15:59 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Ran 2to3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pirep.py

    r856 r919  
    11
    2 from util import utf2unicode
    3 from flight import Flight
    4 
    5 import const
    6 import cPickle as pickle
     2from .util import utf2unicode
     3from .flight import Flight
     4
     5from . import const
     6import pickle as pickle
    77import calendar
    88import datetime
     
    6565    def decodeFlightTypeText(s):
    6666        """Decode the given flight type text."""
    67         for (flighType, text) in PIREP._flightTypes.iteritems():
     67        for (flighType, text) in PIREP._flightTypes.items():
    6868            if s==text:
    6969                return flighType
     
    124124                    pirep.mailWeight = pirep.bookedFlight.mailWeight
    125125                return pirep
    126         except Exception, e:
    127             print "Failed loading PIREP from %s: %s" % (path,
    128                                                         utf2unicode(str(e)))
     126        except Exception as e:
     127            print("Failed loading PIREP from %s: %s" % (path,
     128                                                        utf2unicode(str(e))))
    129129            return None
    130130
     
    367367                pickle.dump(self, f)
    368368            return None
    369         except Exception, e:
     369        except Exception as e:
    370370            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))
    372372            return error
    373373
Note: See TracChangeset for help on using the changeset viewer.