Пример #1
0
def _exec_no_show_result(composedleaf):
    pretty.print_debug(__name__, "Evaluating command", composedleaf)
    obj, action, iobj = composedleaf.object
    ret = commandexec.activate_action(None, *composedleaf.object)
    result_type = commandexec.parse_action_result(action, ret)
    if result_type == commandexec.RESULT_OBJECT:
        return ret
    if result_type == commandexec.RESULT_SOURCE:
        leaves = list(ret.get_leaves())
        if not leaves:
            return
        if len(leaves) == 1:
            return leaves[0]
        else:
            return MultipleLeaf(leaves)
Пример #2
0
def _exec_no_show_result(composedleaf):
    pretty.print_debug(__name__, "Evaluating command", composedleaf)
    obj, action, iobj = composedleaf.object
    ret = commandexec.activate_action(None, *composedleaf.object)
    result_type = commandexec.parse_action_result(action, ret)
    if result_type == commandexec.RESULT_OBJECT:
        return ret
    if result_type == commandexec.RESULT_SOURCE:
        leaves = list(ret.get_leaves())
        if not leaves:
            return
        if len(leaves) == 1:
            return leaves[0]
        else:
            return MultipleLeaf(leaves)
Пример #3
0
 def activate(self, leaf, ctx):
     commandexec.activate_action(ctx, *leaf.object)
Пример #4
0
 def activate(self, leaf, ctx):
     commandexec.activate_action(ctx, *leaf.object)