From 33ea6ef12319927743bcb2ee38b75fc70cf19381 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 29 Nov 2018 15:21:06 +0200 Subject: [PATCH] Be in silence when debug interpreter is run --- platformio/maintenance.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index bafe4fa9..61811142 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -66,11 +66,13 @@ def on_platformio_exception(e): def in_silence(ctx=None): ctx = ctx or app.get_session_var("command_ctx") - assert ctx - ctx_args = ctx.args or [] - return ctx_args and any([ - ctx.args[0] == "upgrade", "--json-output" in ctx_args, - "--version" in ctx_args + if not ctx: + return True + return ctx.args and any([ + ctx.args[0] == "debug" and "--interpreter" in " ".join(ctx.args), + ctx.args[0] == "upgrade", + "--json-output" in ctx.args, + "--version" in ctx.args ])