Python: PyExecutionException message might be empty, use toString then.

`PyExecutionException` breaks all contracts and allows empty messages. It should be fixed, but as for now we workaround it.

GitOrigin-RevId: 67b9e27047f5be64d8a2879bb122f88620aee997
This commit is contained in:
Ilya.Kazakevich
2025-01-22 01:41:55 +01:00
committed by intellij-monorepo-bot
parent 641e64e910
commit 0de98c3d59

View File

@@ -35,7 +35,7 @@ class PythonAddLocalInterpreterPresenter(val moduleOrProject: ModuleOrProject, v
suspend fun okClicked(addEnvironment: PythonAddEnvironment) {
val sdk = addEnvironment.getOrCreateSdk(moduleOrProject).getOrElse {
errorSink.emit(it.localizedMessage)
errorSink.emit(it.localizedMessage.ifBlank { it.toString() })
return
}
moduleOrProject.project.pySdkService.persistSdk(sdk)