Changeset 13505


Ignore:
Timestamp:
Sep 17, 2019 9:26:33 AM (3 months ago)
Author:
randersson
Message:

#5819 Added fix for remaining 13 failing tests

File:
1 edited

Legend:

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

    r13500 r13505  
    2121"""
    2222from sys import version_info
    23 
    2423class Comment(object):
    2524    """Log comment node.
     
    2928    """
    3029    def __init__(self, text):
    31         assert isinstance(text, str if version_info > (3, 0) else basestring)
    3230        self.text = text
    3331
     
    4442
    4543    def __init__(self, node_type):
    46         assert isinstance(node_type, str if version_info > (3, 0) else basestring)
    4744        self.type  = node_type
    4845        self.nodes = []
     
    8784        types may be a string or list of strings.
    8885        """
    89         types = list(types) if not isinstance(types, list) else types
     86        if isinstance(types, str if version_info > (3, 0) else basestring):
     87            types = [types]
    9088
    9189        nodes = []       
Note: See TracChangeset for help on using the changeset viewer.