Suppress warnings with -qq

The quiet arg (-q) is cumulative and should suppress warnings when -qq is
specified per the help text. These warnings were previously added and
did not honor -qq.

Depends-On: I0cf206e8ceeecfca17dd99a83b8c2eaa50e66712
Change-Id: Ic9fe4d7934fa6ad9c4d689a5402f43231c245ada
This commit is contained in:
James Slagle 2018-04-16 11:41:03 -04:00 committed by Emilien Macchi
parent c235aa43d3
commit d696030293

View File

@ -675,7 +675,8 @@ def validate(filename, param_map):
)
)
return 1
if tpl_template_version != current_heat_template_version:
if tpl_template_version != current_heat_template_version \
and args.quiet < 2:
print('Warning: heat_template_version in template %s '
'is outdated: %s (current %s)'
% (
@ -790,7 +791,8 @@ def validate_upgrade_tasks(upgrade_tasks):
print('ERROR: \'step|int ==\' condition should be evaluated first in when conditions for task (%s)' % (task))
return 1
else:
if (' and ' in whenline) and (' or ' not in whenline):
if (' and ' in whenline) and (' or ' not in whenline) \
and args.quiet < 2:
print("Warning: Consider specifying \'and\' conditions as a list to improve readability in task: \"%s\"" % (task_name))
return 0