Skip to content

Try to fail silently on Soup attribute errors#79

Open
GVRV wants to merge 1 commit intocobrateam:masterfrom
GVRV:master
Open

Try to fail silently on Soup attribute errors#79
GVRV wants to merge 1 commit intocobrateam:masterfrom
GVRV:master

Conversation

@GVRV
Copy link
Copy Markdown

@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
Copy Markdown
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