Skip to content

Commit

Permalink
Fix microsoft#1379: Error while enumerating installed packages.
Browse files Browse the repository at this point in the history
When logging environment info, report all errors at "info" level.
  • Loading branch information
Pavel Minaev committed Sep 11, 2023
1 parent 5723ed6 commit 745edf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/debugpy/common/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def report_paths(get_paths, label=None):
swallow_exception(
"Error evaluating {0}",
repr(expr) if expr else util.srcnameof(get_paths),
level="info",
)
return

Expand Down Expand Up @@ -360,7 +361,9 @@ def report_paths(get_paths, label=None):
for pkg in importlib_metadata.distributions():
report(" {0}=={1}\n", pkg.name, pkg.version)
except Exception: # pragma: no cover
swallow_exception("Error while enumerating installed packages.")
swallow_exception(
"Error while enumerating installed packages.", level="info"
)

return "".join(result).rstrip("\n")

Expand Down

0 comments on commit 745edf0

Please sign in to comment.