Skip to content

fix: narrow bare except Exception in preset command reconciliation - #3842

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-narrow-exception
Open

fix: narrow bare except Exception in preset command reconciliation#3842
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-narrow-exception

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Summary

Narrow bare except Exception to specific exception types to let programming errors propagate.

Changes

  • presets/__init__.py: Replace except Exception with (ImportError, FileNotFoundError, OSError, ValueError, TypeError)

Replace overly broad except Exception with specific exception types
(ImportError, FileNotFoundError, OSError, ValueError, TypeError) to
let programming errors propagate while still falling back to generic
path-based registration for expected failures.
@Quratulain-bilal
Quratulain-bilal requested a review from mnriem as a code owner July 29, 2026 08:05
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.

1 participant