Pycharm: next iteration on not to hide errors rally.

No need to return null: throwing exception in case of severe unexpected error is also ok.

GitOrigin-RevId: f8dde3f6d95c08abd97143a5ce3dc9b6eee33e54
This commit is contained in:
Ilya.Kazakevich
2024-07-18 23:36:05 +02:00
committed by intellij-monorepo-bot
parent 09c2ab97bc
commit 76865ffa15
9 changed files with 22 additions and 23 deletions

View File

@@ -95,8 +95,8 @@ abstract class PythonBasedLangSupport : AbstractLangSupport() {
existingSdks: List<Sdk>,
module: Module?): Sdk? {
val venvRoot = FileUtil.toSystemDependentName(PySdkSettings.instance.getPreferredVirtualEnvBasePath(project.basePath))
val venvSdk = createVirtualEnvSynchronously(preferredSdk, existingSdks, venvRoot, project.basePath, project, module, project).getOrLogException(LOGGER)
return venvSdk?.also {
val venvSdk = createVirtualEnvSynchronously(preferredSdk, existingSdks, venvRoot, project.basePath, project, module, project)
return venvSdk.also {
SdkConfigurationUtil.addSdk(it)
}
}