Skip to content

Commit

Permalink
Fix #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
int19h committed Sep 12, 2023
1 parent 5723ed6 commit cbd0c2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/debugpy/common/log.py
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 cbd0c2a

Please sign in to comment.