Skip to content

Commit 8bf6f10

Browse files
committed
test
1 parent 13fb18b commit 8bf6f10

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

rascal2/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def __new__(cls):
173173
cls._instance.ready_event = mp.Event()
174174
cls._instance.close_event = mp.Event()
175175
cls._instance.engine_output = None
176+
cls._instance.matlab_dir = ""
176177
cls._instance.__engine = None
177178
cls._instance.async_start()
178179

@@ -230,7 +231,7 @@ def get_matlab_path(self):
230231
lines = path_file.readlines()
231232
if len(lines) == 4:
232233
arch = {"x86_64": "maci64", "arm64": "maca64"}
233-
if platform.system() == "Darwin" and arch.get(platform.mac_ver()[-1]) != lines[0]:
234+
if platform.system() == "Darwin" and arch.get(platform.mac_ver()[-1]) != lines[0].strip():
234235
# installed intel Matlab on ARM or vice versa
235236
raise MatlabHelper.ConfigError("The installed MATLAB is incompatible, "
236237
f"ensure the {platform.mac_ver()[-1]} version of "
@@ -247,4 +248,5 @@ def get_matlab_path(self):
247248
self.engine_output.append(ex)
248249
LOGGER.error(f"Attempt to read MATLAB _arch file failed {MATLAB_ARCH_FILE}.\n {ex}.")
249250

250-
return str(install_dir)
251+
self.matlab_dir = str(install_dir)
252+
return self.matlab_dir

rascal2/dialogs/settings_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self):
136136
label_layout.addWidget(QtWidgets.QLabel("Current Matlab Directory:"))
137137
label_layout.addStretch(1)
138138
self.matlab_path = QtWidgets.QLineEdit(self)
139-
self.matlab_path.setText(MatlabHelper().get_matlab_path())
139+
self.matlab_path.setText(MatlabHelper().matlab_dir)
140140
self.matlab_path.setReadOnly(True)
141141
self.matlab_path.setPlaceholderText("Select MATLAB directory")
142142
self.matlab_path.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)

0 commit comments

Comments
 (0)