Skip to content

Commit a488b31

Browse files
committed
Add debug details to random CI Exception
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 5118d15 commit a488b31

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/python_inspector/resolution.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ def get_requirements_from_distribution(
8383
if not os.path.exists(location):
8484
return []
8585
reqs = []
86-
for package_data in handler.parse(location):
87-
dependencies = package_data.dependencies
86+
try:
87+
for package_data in handler.parse(location):
88+
dependencies = package_data.dependencies
89+
except Exception as e:
90+
raise Exception(f"Failed to get_requirements_from_distribution for: {location!r}") from e
8891
reqs.extend(get_requirements_from_dependencies(dependencies=dependencies))
8992
return reqs
9093

0 commit comments

Comments
 (0)