From f8aa5a21d456ec6817da6fee5fc7bbf57fad2ceb Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Mar 2022 14:04:26 +0000 Subject: [PATCH] add try block --- examples/Training/python/ROIs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/Training/python/ROIs.py b/examples/Training/python/ROIs.py index ebc43a6c790..c3436c3e4cd 100755 --- a/examples/Training/python/ROIs.py +++ b/examples/Training/python/ROIs.py @@ -292,4 +292,8 @@ def create_mask(mask_bytes, bytes_per_pixel=1): # Close connection # ================ # When you are done, close the session to free up server resources. -conn.close() +try: + conn.close() +except Exception as e: + print(e) +