Commit 48cd5c83 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[status] Use raise_on_error decorator for commands

parent 8cd17124
......@@ -33,16 +33,20 @@ Usage:
"""
import click
from . import common
from .decorators import raise_on_error
@click.command()
@click.pass_context
@raise_on_error
def status(ctx):
"""Shows the working folder status for different objects"""
path = ctx.meta['config'].path
with common.make_webapi(ctx.meta['config']) as webapi:
retval = common.status(webapi, ctx.meta['config'].path, 'dataformat')[0]
retval += common.status(webapi, ctx.meta['config'].path, 'algorithm')[0]
retval += common.status(webapi, ctx.meta['config'].path, 'toolchain')[0]
retval += common.status(webapi, ctx.meta['config'].path, 'experiment')[0]
retval = common.status(webapi, path, 'dataformat')[0]
retval += common.status(webapi, path, 'algorithm')[0]
retval += common.status(webapi, path, 'toolchain')[0]
retval += common.status(webapi, path, 'experiment')[0]
return retval
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment