Changeset 1015:a6e03fae41e0 for src/mlx


Ignore:
Timestamp:
01/28/20 17:53:26 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Adapted to the new interface of PyUIPC using bytes for strings (re #347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r1004 r1015  
    739739
    740740        try:
    741             message = str(message)
     741            message = bytes(str(message), "iso-8859-1")
    742742        except Exception as e:
    743743            print("fsuipc.Simulator.sendMessage: failed to convert the message to a string:", e)
     
    895895        timestamp = Simulator._getTimestamp(data)
    896896
    897         createdNewModel = self._setAircraftName(timestamp, data[5], data[6])
     897        aircraftName = str(data[5], "iso-8859-1")
     898        aircraftPath = str(data[6], "iso-8859-1")
     899
     900        createdNewModel = self._setAircraftName(timestamp, aircraftName, aircraftPath)
    898901        if self._fuelCallback is not None:
    899902            self._aircraftModel.getFuel(self._handler, self._fuelCallback)
Note: See TracChangeset for help on using the changeset viewer.