Beispiel #1
0
    def show_harvest_source(self):

        if len(self.args) >= 2:
            source_id_or_name = unicode(self.args[1])
        else:
            print("Please provide a source name")
            sys.exit(1)
        print(utils.show_harvest_source(source_id_or_name))
Beispiel #2
0
def show(ctx, id):
    """Shows a harvest source.
    """
    flask_app = ctx.meta["flask_app"]

    try:
        with flask_app.test_request_context():
            result = utils.show_harvest_source(id)
    except tk.ObjectNotFound as e:
        tk.error_shout(u"Source <{}> not found.".format(id))
        raise click.Abort()
    click.echo(result)