Skip to content

Commit 619f251

Browse files
committed
Fix a bug with "OSError / WinError" when looking for a compatible Python
1 parent dfd89d0 commit 619f251

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

get-platformio.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pioinstaller/python.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def find_compatible_pythons(
211211
log.debug(output.decode().strip())
212212
except UnicodeDecodeError:
213213
pass
214-
except subprocess.CalledProcessError as e: # pylint:disable=bare-except
214+
except subprocess.CalledProcessError as e:
215215
error = None
216216
try:
217217
error = e.output.decode()
@@ -228,6 +228,8 @@ def find_compatible_pythons(
228228
229229
(MAY require administrator access `sudo`)""",
230230
)
231+
except Exception as e: # pylint: disable=broad-except
232+
log.debug(e)
231233

232234
if not result and raise_exception:
233235
raise exception.IncompatiblePythonError(

0 commit comments

Comments
 (0)