Changeset 13811


Ignore:
Timestamp:
Oct 23, 2019 8:39:36 AM (3 weeks ago)
Author:
randersson
Message:

#5819 Fixed such that set_string does no longer cause exception when input values are of type byte for Python 3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PyFMI/trunk/src/pyfmi/fmi.pyx

    r13578 r13811  
    16201620                'The length of valueref and values are inconsistent.')
    16211621       
     1622        if python3_flag:
     1623            values = [item.decode() if isinstance(item, bytes) else item for item in values]
     1624       
     1625
    16221626        for i in range(val_ref.size):
    16231627            val[i] = values[i]     
     
    41694173            raise FMUException(
    41704174                'The length of valueref and values are inconsistent.')
     4175       
     4176        if python3_flag:
     4177            values = [item.decode() if isinstance(item, bytes) else item for item in values]
    41714178       
    41724179        for i in range(val_ref.size):
Note: See TracChangeset for help on using the changeset viewer.