Skip to content

Commit

Permalink
fix: soscleaner get relative_path safely - 2 (#3754)
Browse files Browse the repository at this point in the history
- the previous update didn't fix this issue totally

Signed-off-by: Xiangce Liu <[email protected]>
  • Loading branch information
xiangce authored Apr 19, 2023
1 parent d6fd1f1 commit cc54201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insights/contrib/soscleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def _excluded_files(self):
results = meta_data["results"]
else:
results = [meta_data["results"]]
relative_paths = [result["object"]["relative_path"] for result in results if 'object' in result]
relative_paths = [result["object"]["relative_path"] for result in results if result and 'object' in result]
excluded_files.extend(relative_paths) if relative_paths else None
return excluded_files

Expand Down

0 comments on commit cc54201

Please sign in to comment.