Skip to content

fix: replace bare except with except Exception to prevent catching system signals - #1481

Open
Cmz9111 wants to merge 1 commit into
AgentOps-AI:mainfrom
Cmz9111:fix/bare-except-1-tops-client-api-versions-v4.py
Open

Cmz9111 wants to merge 1 commit into
AgentOps-AI:mainfrom
Cmz9111:fix/bare-except-1-tops-client-api-versions-v4.py

Conversation

@Cmz9111

@Cmz9111 Cmz9111 commented Nov 10, 2026

Copy link
Copy Markdown

Problem

In agentops/client/api/versions/v4.py, a bare except: clause catches all exceptions including KeyboardInterrupt and SystemExit, preventing clean program shutdown.

Fix

Replace except: with except Exception: to only catch standard exceptions while allowing system-level signals to propagate.

Test

# Pressing Ctrl+C during execution now properly interrupts
# Before: bare except catches KeyboardInterrupt, program hangs
# After: KeyboardInterrupt propagates correctly

This branch has not been deployed

No deployments
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