From 3a2e0296c13ea6b858b8b43a8993f29cf1261be9 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Thu, 16 Aug 2018 12:08:53 +0100 Subject: [PATCH] Fix workspace check in Python 3 --- qt/python/mantidqt/dialogs/spectraselectordialog.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qt/python/mantidqt/dialogs/spectraselectordialog.py b/qt/python/mantidqt/dialogs/spectraselectordialog.py index 9a336aecd4f..4e81ccef459 100644 --- a/qt/python/mantidqt/dialogs/spectraselectordialog.py +++ b/qt/python/mantidqt/dialogs/spectraselectordialog.py @@ -57,11 +57,9 @@ class SpectraSelectionDialog(SpectraSelectionDialogUIBase): @staticmethod def raise_error_if_workspaces_not_compatible(workspaces): - def value_error_if_not_compatible(x): - if not isinstance(x, MatrixWorkspace): - raise ValueError("Expected MatrixWorkspace, found {}.".format(x.__class__.__name__)) - - map(value_error_if_not_compatible, workspaces) + for ws in workspaces: + if not isinstance(ws, MatrixWorkspace): + raise ValueError("Expected MatrixWorkspace, found {}.".format(ws.__class__.__name__)) def __init__(self, workspaces, parent=None): -- GitLab