st2client/st2client/commands/action.py
def format_wf_instances(instances):
    """
    Adds identification characters to a workflow and appropriately shifts
    the non-workflow instances. If no workflows are found does nothing.
    """
    # only add extr chars if there are workflows.
    has_wf = False
    for instance in instances:
        if not getattr(instance, 'children', None):
            continue
        else:
            has_wf = True
            break
    if not has_wf:
        return instances
    # Prepend wf and non_wf prefixes.
    for instance in instances:
        if getattr(instance, 'children', None):
            instance.id = WF_PREFIX + instance.id
        else:
            instance.id = NON_WF_PREFIX + instance.id
    return instances

    Adds identification characters to a workflow and appropriately shifts
    the non-workflow instances. If no workflows are found does nothing.
    
Adds identification characters to a workflow and appropriately shifts
the non-workflow instances. If no workflows are found does nothing.
Adds identification characters to a workflow and appropriately shifts the non - workflow instances . If no workflows are found does nothing .
def format_wf_instances(instances):
    has_wf = False
    for instance in instances:
        if not getattr(instance, 'children', None):
            continue
        else:
            has_wf = True
            break
    if not has_wf:
        return instances
    for instance in instances:
        if getattr(instance, 'children', None):
            instance.id = WF_PREFIX + instance.id
        else:
            instance.id = NON_WF_PREFIX + instance.id
    return instances
def format_wf_instances ( instances ) : has_wf = False for instance in instances : if not getattr ( instance , 'children' , None ) : continue else : has_wf = True break if not has_wf : return instances for instance in instances : if getattr ( instance , 'children' , None ) : instance . id = WF_PREFIX + instance . id else : instance . id = NON_WF_PREFIX + instance . id return instances
Adds identification characters to a workflow and appropriately shifts
the non-workflow instances.
Adds identification characters to a workflow and appropriately shifts the non - workflow instances .
"""
    Adds identification characters to a workflow and appropriately shifts
    the non-workflow instances. If no workflows are found does nothing.
    """ # only add extr chars if there are workflows. # Prepend wf and non_wf prefixes.
instances