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

Remove all bare except clauses #227

Merged
merged 1 commit into from
Feb 5, 2014
Merged

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Feb 5, 2014

While investigating aws/aws-cli#628 I noticed that I'd still
occasionally get tracebacks, particularly a DataNotFoundError
from botocore's base.py module. After further investigation,
this was because the bare except clauses were catching the
KeyboardInterrupts and swallowing them. This resulted in a
traceback somewhere downstream.

The specific error I hit from aws/aws-cli#628 was from base.py,
but I did a quick search through the code and for the time being
at least replaced the bare excepts with except Exception. There's
potential to switch some of these to more specific exceptions later.

While investigating aws/aws-cli#628 I noticed that I'd still
occasionally get tracebacks, particularly a DataNotFoundError
from botocore's base.py module.  After further investigation,
this was because the bare except clauses were catching the
KeyboardInterrupts and swallowing them.  This resulted in a
traceback somewhere downstream.

The specific error I hit from aws/aws-cli#628 was from base.py,
but I did a quick search through the code and for the time being
at least replaced the bare excepts with except Exception.  There's
potential to switch some of these to more specific exceptions later.
@toastdriven
Copy link
Contributor

Looks better, so :shipit:!

@jamesls jamesls merged commit a6337a3 into boto:develop Feb 5, 2014
@jamesls jamesls deleted the no-bare-excepts branch June 23, 2014 18:20
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.

2 participants