From d62f715bf0a12cc2f0a9a39d73111649e41c3ecd Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 15 Jun 2023 14:13:36 -0500 Subject: [PATCH] snapshot... --- modules/aeolus/datasource.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/aeolus/datasource.py b/modules/aeolus/datasource.py index c2c027a5..0615ef7d 100644 --- a/modules/aeolus/datasource.py +++ b/modules/aeolus/datasource.py @@ -1,6 +1,7 @@ import datetime, os from datetime import timezone import glob +import fnmatch import numpy as np import re import pickle @@ -82,10 +83,10 @@ class Files: if os.path.isdir(files_path): for path in Path(files_path).rglob(pattern): self.flist.append(path) - else: + elif fnmatch.fnmatch(files_path, pattern): self.flist.append(files_path) if len(self.flist) == 0: - raise GenericException('no matching files found in: ' + files_path + pattern) + raise GenericException('no matching files found in: ' + files_path + 'matching: ' + pattern) self.ftimes = [] self.span_seconds = datetime.timedelta(minutes=file_time_span).seconds -- GitLab