Silence productimg warning in quiet mode

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2020-03-02 09:24:01 +01:00
parent af5ee7030d
commit 3cd94a4aa5
1 changed files with 7 additions and 5 deletions

View File

@ -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)