Skip to content

Commit fbee93c

Browse files
matteiusoz123
authored andcommitted
safety when OS doesn't have py command
1 parent 97c423e commit fbee93c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pythonfinder/finders/py_launcher_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _iter_pythons(self) -> Iterator[PythonInfo]:
136136
An iterator of PythonInfo objects.
137137
"""
138138
if not self._available:
139-
return
139+
return iter([]) # Return empty iterator when py launcher is not available
140140

141141
for version, path, is_default in self._get_py_launcher_versions():
142142
python_info = self._create_python_info_from_py_launcher(version, path, is_default)

0 commit comments

Comments
 (0)