Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Catch any exceptions when scanning for files #3463

Merged
merged 0 commits into from
Jul 14, 2022
Merged

fix: Catch any exceptions when scanning for files #3463

merged 0 commits into from
Jul 14, 2022

Conversation

ryan-blakley
Copy link
Contributor

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

When a file path is corrupted and doesn't display stat output when attempting to check if it's a dir or file. It will throw a PermissionError traceback. This change stops the traceback and let's the file walking continue.

Fixes #3460

Copy link
Contributor

@xiangce xiangce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

insights/core/hydration.py Outdated Show resolved Hide resolved
@xiangce xiangce merged commit a4c5942 into RedHatInsights:master Jul 14, 2022
xiangce pushed a commit that referenced this pull request Jul 14, 2022
* When a file path is corrupted and doesn't display stat output when
  attempting to check if it's a dir or file. It will throw a
  PermissionError traceback. This change stops the traceback and let's
  the file walking continue.
* Fixes #3460

Signed-off-by: Ryan Blakley <[email protected]>
(cherry picked from commit a4c5942)
@ryan-blakley ryan-blakley deleted the fix_3460 branch July 14, 2022 12:36
xiangce pushed a commit that referenced this pull request Sep 6, 2024
* When a file path is corrupted and doesn't display stat output when
  attempting to check if it's a dir or file. It will throw a
  PermissionError traceback. This change stops the traceback and let's
  the file walking continue.
* Fixes #3460

Signed-off-by: Ryan Blakley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Traceback occurs when certain directories are corrupt in archive.
3 participants