Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill bare excepts with fire #49596

Merged

Conversation

Projects
None yet
7 participants
@terminalmage
Copy link
Contributor

commented Sep 10, 2018

These prevent the signal handlers from shutting down a process via a raising a SystemExit. They are ticking time bombs of race conditions that leave processes running when daemons are shut down or restarted.

Friends don't let friends use bare excepts.

Kill bare excepts with fire
These prevent the signal handlers from shutting down a process via a
raising a SystemExit. They are ticking time bombs of race conditions
that leave processes running when daemons are shut down or restarted.

Friends don't let friends use bare excepts.

@terminalmage terminalmage requested a review from saltstack/team-core as a code owner Sep 10, 2018

@salt-jenkins salt-jenkins requested review from saltstack/team-boto Sep 10, 2018

@cachedout
Copy link
Collaborator

left a comment

Nice.

@rallytime
Copy link
Contributor

left a comment

Yay! Nice to have this cleaned up.

@DmitryKuzmenko
Copy link
Contributor

left a comment

Awesome! Now I'm happy:

$ grep -Rn "^ *except:" salt/ | wc -l
0
@isbm

isbm approved these changes Sep 11, 2018

@rallytime rallytime merged commit e8171de into saltstack:2017.7 Sep 11, 2018

6 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details

@terminalmage terminalmage deleted the terminalmage:kill-bare-excepts-with-fire branch Sep 11, 2018

@damon-atkins

This comment has been minimized.

Copy link
Member

commented Sep 28, 2018

Should this be added to the pylint tests?
Might also be a good idea to have some doco for the extra pylint test to point people to. On why the "Do not do this" exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.