From ee81af22f0e38e4c723ab328eda588e04de39ff7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Sat, 15 Feb 2025 20:34:06 -0500 Subject: [PATCH] Rename RE_PRODUCT to RE_FILE for accuracy --- lib/nexrad/archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nexrad/archive.py b/lib/nexrad/archive.py index a9d5c8d..60d7ef7 100644 --- a/lib/nexrad/archive.py +++ b/lib/nexrad/archive.py @@ -134,7 +134,7 @@ class Archive(): RE_YEAR = re.compile(r'^\d{4}$') RE_MONTH_DAY = re.compile(r'^\d{2}$') RE_CALL = re.compile(r'^[A-Z]{4}$') - RE_PRODUCT = re.compile(r'^([A-Z]{4})(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})') + RE_FILE = re.compile(r'^([A-Z]{4})(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})') def each_downloaded_key(self, year: int=None, @@ -182,7 +182,7 @@ class Archive(): parts.append(call.name) for item in os.scandir(os.path.join(*parts)): - if not (item.is_file() and self.RE_PRODUCT.match(item.name)): + if not (item.is_file() and self.RE_FILE.match(item.name)): continue yield '/'.join([*parts[1:], item.name])