Skip to content

fix: replace bare except with except Exception#1308

Open
YouFoxGirl wants to merge 2 commits intoAgentOps-AI:mainfrom
YouFoxGirl:foxclaw/fix-2026-03-21T23-18-37
Open

fix: replace bare except with except Exception#1308
YouFoxGirl wants to merge 2 commits intoAgentOps-AI:mainfrom
YouFoxGirl:foxclaw/fix-2026-03-21T23-18-37

Conversation

@YouFoxGirl
Copy link

@YouFoxGirl YouFoxGirl commented Mar 22, 2026

What this PR does

Replace bare except: clauses with except Exception: to avoid catching
KeyboardInterrupt and SystemExit. Added a TODO note for future
more specific exception handling where applicable.

Why this matters

Bare except: catches all exceptions including KeyboardInterrupt
and SystemExit, which can hide bugs and make debugging harder.

FoxToy and others added 2 commits March 21, 2026 11:09
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **bare_except**: Replaced bare except: with except Exception:
- **sync_sleep_in_async**: Replaced time.sleep() with asyncio.sleep() in async functions
- **sync_sleep_in_async**: Replaced time.sleep() with asyncio.sleep() in async functions
- **sync_sleep_in_async**: Replaced time.sleep() with asyncio.sleep() in async functions
Use except Exception: instead of bare except: to avoid catching
KeyboardInterrupt and SystemExit.
@YouFoxGirl YouFoxGirl force-pushed the foxclaw/fix-2026-03-21T23-18-37 branch from 609dc0e to bf08ea9 Compare March 22, 2026 02:31
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