From 3cd94a4aa52432991c0267724840390ecddadc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 2 Mar 2020 09:24:01 +0100 Subject: [PATCH] Silence productimg warning in quiet mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running with `--quiet`, the warning should not be printed. It would confuse tools that expect only compose path to be printed. Signed-off-by: Lubomír Sedlář --- pungi/scripts/pungi_koji.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pungi/scripts/pungi_koji.py b/pungi/scripts/pungi_koji.py index 194f8de4..3dc7358a 100644 --- a/pungi/scripts/pungi_koji.py +++ b/pungi/scripts/pungi_koji.py @@ -241,11 +241,13 @@ def main(): # TODO: workaround for config files containing skip_phase = productimg # Remove when all config files are up to date - if "productimg" in opts.skip_phase or "productimg" in opts.just_phase: - print( - "WARNING: productimg phase has been removed, please remove it from --skip-phase or --just-phase option", # noqa: E501 - file=sys.stderr, - ) + if not opts.quiet: + if "productimg" in opts.skip_phase or "productimg" in opts.just_phase: + print( + "WARNING: productimg phase has been removed, please remove it from " + "--skip-phase or --just-phase option", + file=sys.stderr, + ) for err in errors[:]: if "'productimg' is not one of" in err: errors.remove(err)