From 49e8aa0c7e87c0eb26120553f22bf66650cb9bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 28 May 2018 13:38:19 +0200 Subject: [PATCH] Silence config warnings in quiet mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a bit unfortunate we can't use the logger for printing these, but there is cyclic dependency: to set up logger, we need Compose object (to generate path to log file), but to create Compose object we need a valid config. JIRA: COMPOSE-2577 Signed-off-by: Lubomír Sedlář --- bin/pungi-koji | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pungi-koji b/bin/pungi-koji index b3b49de5..68dfc44b 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -229,8 +229,9 @@ def main(): sys.exit(1) pungi.checks.check_umask(logger) errors, warnings = pungi.checks.validate(conf) - for warning in warnings: - print(warning, file=sys.stderr) + if not opts.quiet: + for warning in warnings: + print(warning, file=sys.stderr) if errors: for error in errors: print(error, file=sys.stderr)