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

Try to fail silently on Soup attribute errors #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GVRV
Copy link

@GVRV GVRV commented Nov 24, 2014

I was getting errors like the following when trying to minify a few email templates within celery tasks (to avoid clipping by GMail).

AttributeError: 'NavigableString' object has no attribute 'name'
AttributeError: 'Comment' object has no attribute 'name'

Tried to silence these errors by using getattr, so in the worst case, we're failing silently instead of blowing up.

@andrewsmedina
Copy link
Member

@GVRV thank you. Can you add some tests?

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