swh.core.cli package

Module contents

class swh.core.cli.AliasedGroup(name=None, commands=None, **attrs)[source]

Bases: click.core.Group

A simple Group that supports command aliases, as well as notes related to options

get_command(ctx, cmd_name)[source]

Given a context and a command name, this returns a Command object if it exists or returns None.

add_alias(name, alias)[source]
format_options(ctx, formatter)[source]

Writes all the options into the formatter if they exist.

swh.core.cli.clean_exit_on_signal(signal, frame)[source]

Raise a SystemExit exception to let command-line clients wind themselves down on exit