Skip to content

fix: narrow bare except Exception in preset command reconciliation (import of github/spec-kit#3842) - #130

Open
one-kash wants to merge 1 commit into
mainfrom
import/pr-3842
Open

fix: narrow bare except Exception in preset command reconciliation (import of github/spec-kit#3842)#130
one-kash wants to merge 1 commit into
mainfrom
import/pr-3842

Conversation

@one-kash

Copy link
Copy Markdown

Imported from upstream PR github#3842
Original author: @Quratulain-bilal
Original head branch: fix/presets-narrow-exception


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.
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.

2 participants