fix(env_inv.py): handle None values in sorting of installations to prevent errors (#117)
This commit is contained in:
parent
d0bf78c5f0
commit
053908448f
|
|
@ -319,7 +319,8 @@ class EnvDiscovery:
|
||||||
seen_paths.add(path)
|
seen_paths.add(path)
|
||||||
ver = self._get_python_version(path)
|
ver = self._get_python_version(path)
|
||||||
installations.append({"version": ver, "path": path})
|
installations.append({"version": ver, "path": path})
|
||||||
installations = sorted(installations, key=lambda x: x.get("version", ""))
|
|
||||||
|
installations = sorted(installations, key=lambda x: x.get("version", "") or "")
|
||||||
self.results["python"]["installations"] = installations
|
self.results["python"]["installations"] = installations
|
||||||
|
|
||||||
def _get_python_version(self, python_path):
|
def _get_python_version(self, python_path):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue