Move "in_silence" to PlatformioCLI

This commit is contained in:
Ivan Kravets
2019-05-21 13:18:11 +03:00
parent a30b79c5fc
commit 4386dc56ea
5 changed files with 14 additions and 14 deletions

View File

@@ -42,12 +42,12 @@ def on_platformio_start(ctx, force, caller):
set_caller(caller)
telemetry.on_command()
if not in_silence():
if not PlatformioCLI.in_silence():
after_upgrade(ctx)
def on_platformio_end(ctx, result): # pylint: disable=unused-argument
if in_silence():
if PlatformioCLI.in_silence():
return
try:
@@ -66,14 +66,6 @@ def on_platformio_exception(e):
telemetry.on_exception(e)
def in_silence():
args = PlatformioCLI.leftover_args
return args and any([
args[0] == "debug" and "--interpreter" in " ".join(args),
args[0] == "upgrade", "--json-output" in args, "--version" in args
])
def set_caller(caller=None):
if not caller:
if getenv("PLATFORMIO_CALLER"):