Changeset 13592


Ignore:
Timestamp:
Sep 24, 2019 2:56:08 PM (3 months ago)
Author:
randersson
Message:

#5819 Hopefully fixed issue with text encoding causing parse_jmi_log to to return objects of type bytes instead of the str.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/pyjmi/log/parser.py

    r13461 r13592  
    2323import numpy as np
    2424from .tree import *
     25from pyjmi.common import python3_flag
    2526
    2627
     
    5354        else:
    5455            assert '"' not in text           
    55 #        return text
    56         return text.encode('ascii', 'xmlcharrefreplace') # avoid printing all strings as u'...'
     56        # for python 2 we need to avoid printing all strings as u'...'
     57        return text if python3_flag else text.encode('ascii', 'xmlcharrefreplace')
    5758
    5859def parse_vector(text):
Note: See TracChangeset for help on using the changeset viewer.