mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix #1379: Error while enumerating installed packages.
When logging environment info, report all errors at "info" level.
This commit is contained in:
parent
5723ed6b1a
commit
cbd0c2a1c1
1 changed files with 4 additions and 1 deletions
|
|
@ -304,6 +304,7 @@ def get_environment_description(header):
|
|||
swallow_exception(
|
||||
"Error evaluating {0}",
|
||||
repr(expr) if expr else util.srcnameof(get_paths),
|
||||
level="info",
|
||||
)
|
||||
return
|
||||
|
||||
|
|
@ -360,7 +361,9 @@ def get_environment_description(header):
|
|||
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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue