Skip to content

Commit df0b6da

Browse files
authored
Merge pull request #215 from emmanuel-ferdman/main
Raise file not found exception
2 parents d2d7d4e + f4d28d8 commit df0b6da

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 0.22.4 (2025-05-05)
44

55
- DOC: Fix jupyter cache for documentation notebook [#211](https://github.com/sertit/eoreader/issues/211)
6+
- FIX: Raise missing file not found exception - by @emmanuel-ferdman
67

78
## 0.22.3 (2025-05-05)
89

eoreader/products/sar/sar_product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def _get_pp_graph(self) -> str:
774774
else:
775775
pp_graph = AnyPath(os.environ[PP_GRAPH]).resolve()
776776
if not pp_graph.is_file() or pp_graph.suffix != ".xml":
777-
FileNotFoundError(f"{pp_graph} cannot be found.")
777+
raise FileNotFoundError(f"{pp_graph} cannot be found.")
778778

779779
return str(pp_graph)
780780

@@ -1083,7 +1083,7 @@ def _despeckle_sar(
10831083
else:
10841084
dspk_graph = AnyPath(os.environ[DSPK_GRAPH]).resolve()
10851085
if not dspk_graph.is_file() or dspk_graph.suffix != ".xml":
1086-
FileNotFoundError(f"{dspk_graph} cannot be found.")
1086+
raise FileNotFoundError(f"{dspk_graph} cannot be found.")
10871087

10881088
# Create command line and run it
10891089
if not os.path.isfile(dspk_dim):

eoreader/reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def _open_path(
728728
product_path = AnyPath(product_path)
729729

730730
if not product_path.exists():
731-
FileNotFoundError(f"Non existing product: {product_path}")
731+
raise FileNotFoundError(f"Non existing product: {product_path}")
732732

733733
if custom:
734734
from eoreader.products import CustomProduct

0 commit comments

Comments
 (0)