Skip to content

Fix bare except clause in alembic/util/messaging.py#1830

Open
koteshyelamati wants to merge 1 commit into
sqlalchemy:mainfrom
koteshyelamati:main
Open

Fix bare except clause in alembic/util/messaging.py#1830
koteshyelamati wants to merge 1 commit into
sqlalchemy:mainfrom
koteshyelamati:main

Conversation

@koteshyelamati

Copy link
Copy Markdown

Replace bare except: with except Exception: in the status() context manager.

The status() context manager prints a status message and a completion/failure indicator. Its bare except: catches BaseException, meaning KeyboardInterrupt or SystemExit during the operation would trigger the failure message and then re-raise — but the intent is clearly to catch operational exceptions, not signals. except Exception: is the correct type here.

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