Skip to content

Commit 12ab12a

Browse files
committed
Fix _look_for_prod_band_file with None window
1 parent ac2dbf9 commit 12ab12a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

eosets/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ def _look_for_prod_band_file(
104104
with contextlib.suppress(StopIteration):
105105
# Check if the band exists in a non-writable directory
106106
band_regex = f"*{prod.condensed_name}*_{band_name}_*"
107-
if "window" in kwargs:
108-
band_regex += f"{get_window_suffix(kwargs.get('window'))}*"
107+
window = get_window_suffix(kwargs.get("window"))
108+
if window is not None:
109+
band_regex += f"{window}*"
109110
LOGGER.debug(
110111
f"Looking for {band_regex} in {prod._get_band_folder(writable=writable)}"
111112
)

0 commit comments

Comments
 (0)