From e498f9c77d396fa8826c443ef8cce13b13a4cf65 Mon Sep 17 00:00:00 2001
From: Joseph Torsney <joseph.torsney@stfc.ac.uk>
Date: Thu, 11 Mar 2021 06:09:30 -0500
Subject: [PATCH] Change RuntimeError to EOFError re28176

---
 qt/applications/workbench/workbench/utils/io.py           | 4 ++--
 qt/applications/workbench/workbench/utils/test/test_io.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qt/applications/workbench/workbench/utils/io.py b/qt/applications/workbench/workbench/utils/io.py
index 51ee9a69a37..9b9ca5b699d 100644
--- a/qt/applications/workbench/workbench/utils/io.py
+++ b/qt/applications/workbench/workbench/utils/io.py
@@ -11,7 +11,7 @@ from qtpy.QtWidgets import QInputDialog
 def input_qinputdialog(prompt: str = "") -> str:
     """
     Raises a QInputDialog with a given prompt and returns the user input as a string.
-    If the user cancels the dialog, a RuntimeError is raised.
+    If the user cancels the dialog, an EOFError is raised.
     Intended to be used to override python's `input` function to be more user friendly.
     """
     dlg = QInputDialog()
@@ -21,4 +21,4 @@ def input_qinputdialog(prompt: str = "") -> str:
     if accepted:
         return dlg.textValue()
     else:
-        raise RuntimeError("User input request cancelled")
+        raise EOFError("User input request cancelled")
diff --git a/qt/applications/workbench/workbench/utils/test/test_io.py b/qt/applications/workbench/workbench/utils/test/test_io.py
index af97e7cd6a0..ffcc14e79f7 100644
--- a/qt/applications/workbench/workbench/utils/test/test_io.py
+++ b/qt/applications/workbench/workbench/utils/test/test_io.py
@@ -39,4 +39,4 @@ class IOTest(TestCase):
         mock_QInputDialog = mock_QInputDialogClass()
         mock_QInputDialog.exec_.return_value = False
 
-        self.assertRaises(RuntimeError, input_qinputdialog)
+        self.assertRaises(EOFError, input_qinputdialog)
-- 
GitLab