From d9618ed4524324d905170dc7de9db507643493b7 Mon Sep 17 00:00:00 2001
From: Mattia Mancini <mancini@astron.nl>
Date: Tue, 14 May 2019 09:48:24 +0000
Subject: [PATCH] SSB-44: add checking if the file exists

---
 .../lib/datacontainers/holography_dataset.py                  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py b/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py
index 9881f1d0dd0..7c21b0c256a 100644
--- a/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py
+++ b/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py
@@ -537,6 +537,10 @@ class HolographyDataset():
         :return: the read dataset
         """
         f = None
+
+        if not os.path.exists(path):
+            raise FileNotFoundError(path)
+
         try:
             f = h5py.File(path, "r")
 
-- 
GitLab