fix: replace bare except with except Exception in tool scripts#16371
fix: replace bare except with except Exception in tool scripts#16371harshadkhetpal wants to merge 2 commits intoansible:develfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo Python scripts in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Replace bare
except:clauses withexcept Exception:in two tool scripts (3 occurrences total).Bare
except:catchesSystemExit,KeyboardInterrupt, andGeneratorExitin addition to regular exceptions, which can mask critical signals.Files changed:
tools/scripts/config-watcher— 2 bare except clauses (lines 39, 57)tools/scripts/post_webhook.py— 1 bare except clause (line 131)Change:
Testing
No behavior change for normal exceptions — style/correctness fix only.
Prevents accidentally catching
SystemExitandKeyboardInterrupt.Summary by CodeRabbit