From 2545143f9aebac04fb2af70aa099a3f02e74719b Mon Sep 17 00:00:00 2001
From: Karim Ahmed <karim.ahmed@xfel.eu>
Date: Wed, 6 May 2020 03:10:49 +0200
Subject: [PATCH] fix the exception comment

---
 notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb
index bc951eabc..eaae915a6 100644
--- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb
+++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb
@@ -184,8 +184,9 @@
     "            gain_setting =  gsettings[0]  \n",
     "        except Exception as e:\n",
     "            print(f'Error while reading gain setting from: \\n{control_fname}')\n",
-    "            print(e)\n",
-    "            print(\"Gain setting is not found in the control information\")\n",
+    "            print(f'Error: {e}')\n",
+    "            if \"component not found\" in str(e):\n",
+    "                print(\"Gain setting is not found in the control information\")\n",
     "            print(\"Data will not be processed\")\n",
     "            sequences = []"
    ]
-- 
GitLab