fixed bug in consistency check

This commit is contained in:
Martin Diehl 2015-02-10 13:49:47 +00:00
parent 43e9cc3417
commit 40a792d785
1 changed files with 2 additions and 2 deletions

View File

@ -115,8 +115,8 @@ parser.set_defaults(scale = 1.0)
(options,filenames) = parser.parse_args()
if len(options.type) == 0: parser.error('please select a feature type')
if not set(options.type).issubset(set(map(lambda x: x['name'],features))):
parser.error('type must be chosen from (%s)...'%(', '.join(map(lambda x:', '.join([x['name']]),features))))
if not set(options.type).issubset(set(list(itertools.chain(*map(lambda x: x['names'],features))))):
parser.error('type must be chosen from (%s)...'%(', '.join(map(lambda x:'|'.join(x['names']),features))) )
if 'biplane' in options.type and 'boundary' in options.type:
parser.error("please select only one alias for 'biplane' and 'boundary'")