From 56a98bb8db211ecaf8b0761b2d8d56fe37495759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Wed, 10 Jun 2020 16:57:34 +0200 Subject: [PATCH] Solve erroneous warning from summaryplot --- src/subscript/summaryplot/summaryplot.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/subscript/summaryplot/summaryplot.py b/src/subscript/summaryplot/summaryplot.py index b4c58c8db..48eada628 100644 --- a/src/subscript/summaryplot/summaryplot.py +++ b/src/subscript/summaryplot/summaryplot.py @@ -265,8 +265,12 @@ def summaryplotter( # line matchedsummaryvectors = [] restartvectors = [] + wildcard_in_use = False for vector in vectors: - if vector not in summaryfiles[0].keys(): + matchingvectors = summaryfiles[0].keys(vector) + if len(matchingvectors) > 1: + wildcard_in_use = True + if not matchingvectors: # Check if it is a restart vector with syntax # :,, aka SOIL:40,31,33 if re.match(r"^[A-Z]+:[0-9]+,[0-9]+,[0-9]+$", vector): @@ -275,6 +279,10 @@ def summaryplotter( else: logging.warning("No summary or restart vectors matched %s", vector) matchedsummaryvectors.extend(summaryfiles[0].keys(vector)) + if wildcard_in_use: + logging.info( + "Summary vectors after wildcard expansion: %s", str(matchedsummaryvectors) + ) # If we have any restart vectors defined, we must also load the restart files if restartvectors: