Exemplo n.º 1
0
def up(*args, **cmdoptions):
    l = len(utl.topic_stack)
    if l > 1:
	utl.topic_stack.pop()
	utl.set_topic(utl.topic_stack[-1])
    else:
	utl.log_debug("Already at the top of the stack")
Exemplo n.º 2
0
def cd_(*args, **cmdoptions):
    utl.log_dev("args: %s\nopts: %s" % (repr(args), repr(cmdoptions)))
    if not cmdoptions["topic"]:
	utl.log_err("No topic specified")
	return 1

    if cmdoptions["topic"]:
	utl.set_topic(cmdoptions["topic"])
    if args:
	raise ReparseRequest()
    if utl.crm_topic not in utl.topic_stack:
	utl.topic_stack.append(cmdoptions["topic"])
    if not utl.global_opts["interactive"]:
	help(cmdoptions["topic"])
    return 0