don't try to access folders that don't exist

this happened in the case when different types of output exist in
different phases, e.g.

Aluminum: generic, plastic, sources
Steel: generic, plastic

We are a little bit inconsistent because 'generic' and 'plastic' are
always created (even if empty) but 'sources' will only exist if it
contains output. In future, we should have only folders that actually
contain data
This commit is contained in:
Martin Diehl 2020-08-28 12:45:41 +02:00
parent 338281e0ab
commit c58693328e
1 changed files with 3 additions and 2 deletions

View File

@ -401,8 +401,9 @@ class Result:
if sets is True:
groups.append(group)
else:
match = [e for e_ in [glob.fnmatch.filter(f[group].keys(),s) for s in sets] for e in e_]
if len(set(match)) == len(sets): groups.append(group)
if group in f.keys():
match = [e for e_ in [glob.fnmatch.filter(f[group].keys(),s) for s in sets] for e in e_]
if len(set(match)) == len(sets): groups.append(group)
return groups