Skip to content

fix: replace bare except with except Exception in task_finished#9

Open
prabindersinghh wants to merge 1 commit intoouterbounds:mainfrom
prabindersinghh:fix/bare-except-in-task-finished
Open

fix: replace bare except with except Exception in task_finished#9
prabindersinghh wants to merge 1 commit intoouterbounds:mainfrom
prabindersinghh:fix/bare-except-in-task-finished

Conversation

@prabindersinghh
Copy link
Copy Markdown

@prabindersinghh prabindersinghh commented Mar 10, 2026

Summary

Replace bare except: with except Exception: in task_finished
cleanup block to avoid silently swallowing SystemExit and KeyboardInterrupt.

Context / Motivation

A bare except: catches ALL exceptions including SystemExit,
KeyboardInterrupt, and GeneratorExit. This means a Ctrl+C during
cleanup would be silently swallowed, making the process appear hung.

Changes Made

  • Changed except: to except Exception: on line 209 of slurm_decorator.py
  • SystemExit and KeyboardInterrupt now propagate correctly

Testing

No automated test — single line change, behavior verified by code inspection.

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