def list_harvest_sources(self):
        if len(self.args) >= 2 and self.args[1] == "all":
            all = True
        else:
            all = False

        print(utils.list_sources(all))
Exemple #2
0
def sources(ctx, all):
    """Lists harvest sources.

    If 'all' is defined, it also shows the Inactive sources

    """
    flask_app = ctx.meta["flask_app"]

    with flask_app.test_request_context():
        result = utils.list_sources(bool(all))
    click.echo(result)