Skip to content
Snippets Groups Projects
Commit 3a2e0296 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Fix workspace check in Python 3

parent edb517ce
No related branches found
No related tags found
No related merge requests found
...@@ -57,11 +57,9 @@ class SpectraSelectionDialog(SpectraSelectionDialogUIBase): ...@@ -57,11 +57,9 @@ class SpectraSelectionDialog(SpectraSelectionDialogUIBase):
@staticmethod @staticmethod
def raise_error_if_workspaces_not_compatible(workspaces): def raise_error_if_workspaces_not_compatible(workspaces):
def value_error_if_not_compatible(x): for ws in workspaces:
if not isinstance(x, MatrixWorkspace): if not isinstance(ws, MatrixWorkspace):
raise ValueError("Expected MatrixWorkspace, found {}.".format(x.__class__.__name__)) raise ValueError("Expected MatrixWorkspace, found {}.".format(ws.__class__.__name__))
map(value_error_if_not_compatible, workspaces)
def __init__(self, workspaces, def __init__(self, workspaces,
parent=None): parent=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment