diff --git a/fsl/utils/platform.py b/fsl/utils/platform.py index 8599928e18756639bf17d8a749bfcaf141409318..173b031cbf6e090c9792f0b1af44061a7772c8f1 100644 --- a/fsl/utils/platform.py +++ b/fsl/utils/platform.py @@ -453,10 +453,10 @@ class Platform(notifier.Notifier): else: distro = None - if distro is None: - raise RuntimeError("No WSL installations found at \\wsl$\ - a valid WSL 2.0 installation is required") - else: - return "\\\\wsl$\\" + distro + wslpath.replace("/", "\\") + if not distro: + raise RuntimeError("Could not identify WSL installation from FSLDIR (%s)" % self.fsldir) + + return "\\\\wsl$\\" + distro + wslpath.replace("/", "\\") platform = Platform() """An instance of the :class:`Platform` class. Feel free to create your own