Fix logic around heat output exclusions handling

The logic in the validation was incorrect in that it would actually
error (return 1) if args.quiet >= 2, even though the file was excluded.

This commit fixes that bug, as well as improves the message around
excluded files, which should not be a warning, only informative.

Change-Id: I2cd8cd84a7ebb952e3c39f99a460177b9be9c2e1
This commit is contained in:
James Slagle 2018-08-13 14:15:07 -04:00
parent 715e1f7315
commit 5710f5b35f
1 changed files with 7 additions and 6 deletions

View File

@ -1149,12 +1149,13 @@ def validate(filename, param_map):
elif data['type'] in CONFIG_RESOURCE_TYPES:
if 'outputs' in data['properties']:
if filename in HEAT_OUTPUTS_EXCLUSIONS \
and args.quiet < 2:
print('Warning: resource %s from %s uses Heat '
'outputs which are not supported with '
'config-download.'
% (resource, filename))
if filename in HEAT_OUTPUTS_EXCLUSIONS:
if args.quiet < 1:
print('Resource %s from %s uses Heat '
'outputs which are not supported with '
'config-download (ignored due to '
'exclusions).'
% (resource, filename))
else:
print('ERROR: resource %s from %s uses Heat '
'outputs which are not supported with '