Some improvements

This commit is contained in:
Ivan Kravets
2017-07-31 19:05:03 +03:00
parent 4944731dc6
commit 06b49ec3ec

View File

@ -38,11 +38,10 @@ def in_silence(ctx=None):
ctx = ctx or app.get_session_var("command_ctx")
assert ctx
ctx_args = ctx.args or []
conditions = [
ctx_args and ctx.args[0] == "upgrade", "--json-output" in ctx_args,
return ctx_args and any([
ctx.args[0] == "upgrade", "--json-output" in ctx_args,
"--version" in ctx_args
]
return ctx_args and any(conditions)
])
def on_platformio_start(ctx, force, caller):