Skip to content

Commit

Permalink
return data if parser is None
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcnd committed Jul 11, 2014
1 parent dc87553 commit 2458b0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions isbnlib/dev/webquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def check_data(self, data_checker=None): # pragma: no cover

def parse_data(self, parser=json.loads):
"""Parse the data (default JSON -> PY)."""
if parser is None:
return self.data
return parser(self.data) # <-- data is now unicode


Expand Down

0 comments on commit 2458b0c

Please sign in to comment.