Skip to content

Commit

Permalink
Catch more generic error when attempting to decode JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnVinyard committed Jan 24, 2019
1 parent e178bca commit 6430d23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zounds/datasets/internetarchive.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import requests
import urlparse
from zounds.soundfile.audio_metadata import AudioMetaData
from simplejson.decoder import JSONDecodeError


class InternetArchive(object):
Expand Down Expand Up @@ -54,7 +53,7 @@ def __iter__(self):

try:
all_files = resp.json()['files']
except JSONDecodeError as e:
except ValueError as e:
all_files = dict()

for k, v in all_files.iteritems():
Expand Down

0 comments on commit 6430d23

Please sign in to comment.