fix(env_inv.py): handle None values in sorting of installations to prevent errors (#117)

This commit is contained in:
Ariel Frischer 2025-03-08 18:03:06 -08:00 committed by GitHub
parent d0bf78c5f0
commit 053908448f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -319,7 +319,8 @@ class EnvDiscovery:
seen_paths.add(path)
ver = self._get_python_version(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
def _get_python_version(self, python_path):