Skip to content

Commit

Permalink
handle ElementTree ParseErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Sep 20, 2011
1 parent 47e0e6e commit cda086b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.rst
Expand Up @@ -112,6 +112,7 @@ Version History
---------------

0.5
Handle empty responses from the API.
``setup.py`` now searches the `Homebrew`_ user-local prefix.

0.4
Expand Down
2 changes: 1 addition & 1 deletion lastfp/__init__.py
Expand Up @@ -230,7 +230,7 @@ def parse_metadata(xml):
"""
try:
root = etree.fromstring(xml)
except ExpatError:
except (ExpatError, etree.ParseError):
# The Last.fm API occasionally generates malformed XML when its
# includes an illegal character (UTF8-legal but prohibited by
# the XML standard).
Expand Down

0 comments on commit cda086b

Please sign in to comment.