Ejemplo n.º 1
0
def cli(debug):
    ctx = click.get_current_context()
    if debug:
        click_utils.echo_context(ctx)

    subcommand = ctx.invoked_subcommand
    # click.echo('Subcommand: {}'.format(subcommand))
    if subcommand is None:
        click.echo('I was invoked without a subcommand...')
    else:
        if debug:
            click.echo('I am about to invoke subcommand: %s.' % subcommand)
Ejemplo n.º 2
0
def debug_context(**kwargs):
    ctx = click.get_current_context()

    click_utils.inherit_parent_params(ctx, ("debug",))

    debug_ = ctx.params["debug"]

    if debug_:
        click.echo("Debug mode: %s" % ("enabled" if debug_ else "disabled"))
        click_utils.echo_context(ctx)
        click_utils.echo_kwargs(kwargs)

        subcommand = ctx.invoked_subcommand
        click.echo("subcommand: %s" % subcommand)
Ejemplo n.º 3
0
def debug_context(**kwargs):
    ctx = click.get_current_context()

    # debug_ = ctx.params.get('debug') or ctx.parent.params.get('debug') if ctx.parent else False
    # if debug_:
    #     echo_context(ctx)

    click_utils.inherit_parent_params(ctx, ('debug',))

    debug_ = ctx.params['debug']

    if debug_:
        click.echo('Debug mode: %s' % ('enabled' if debug_ else 'disabled'))
        click_utils.echo_context(ctx)
        click_utils.echo_kwargs(kwargs)

        subcommand = ctx.invoked_subcommand
        click.echo('subcommand: %s' % subcommand)
Ejemplo n.º 4
0
def cli(debug):
    """
    Provides CLI commands for interacting with text data/files.
    """
    ctx = click.get_current_context()
    if debug:
        click_utils.echo_context(ctx)

    subcommand = ctx.invoked_subcommand
    if subcommand is None:
        click.echo("I was invoked without a subcommand...")
    else:
        if debug:
            click.echo("I was invoked with subcommand: %s." % subcommand)

    try:
        debug_context(**{})
    except:
        logging.exception("debug_context error")
Ejemplo n.º 5
0
def cli(debug):
    """
    Provides CLI commands for interacting with Robot Framework test output data/files (XML format).
    """
    ctx = click.get_current_context()
    if debug:
        click_utils.echo_context(ctx)

    subcommand = ctx.invoked_subcommand
    # click.echo('Subcommand: {}'.format(subcommand))
    if subcommand is None:
        click.echo('I was invoked without a subcommand...')
    else:
        if debug:
            click.echo('I was invoked with subcommand: %s.' % subcommand)

    try:
        debug_context(**{})
    except:
        logging.exception('debug_context error')