From c58693328e7fdd2b71c9b5caf830c78b16b64ecb Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 28 Aug 2020 12:45:41 +0200 Subject: [PATCH] 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 --- python/damask/_result.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index 2ada4cd01..d739db8f5 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -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