Replace bare except: with except Exception: in macOS handlers#1434
Replace bare except: with except Exception: in macOS handlers#1434hobostay wants to merge 1 commit into
Conversation
Bare except: clauses catch all exceptions including SystemExit, KeyboardInterrupt, and GeneratorExit, preventing clean process shutdown during accessibility tree traversal. Replace with except Exception: to only catch actual errors while allowing interrupt signals to propagate correctly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the Cua Team on Vercel. A member of the Team first needs to authorize it. |
|
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 (1)
📝 WalkthroughWalkthroughThe PR updates bare ChangesException Handling Specificity
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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. Review rate limit: 4/8 reviews remaining, refill in 24 minutes and 21 seconds.Comment |
Summary
except:clauses incomputer-server/computer_server/handlers/macos.pywithexcept Exception:except:catchesSystemExit,KeyboardInterrupt, andGeneratorExit, preventing clean process shutdown during accessibility tree traversalexcept Exception:still catches all runtime errors while allowing interrupt signals to propagate correctlyAffected methods:
get_application_windows()(line 825)get_all_windows()inner loop (line 859) and outer (line 863)click_and_drag()cleanup (line 1195)drag()cleanup (line 1232)Test plan
Ctrl+Ccan now cleanly interrupt the process during accessibility tree traversal🤖 Generated with Claude Code
Summary by CodeRabbit