Skip to content

Commit

Permalink
offset.py: handle accurip response not found
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveForest committed Sep 11, 2017
1 parent 94b9a1b commit 311084c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions whipper/command/offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ def do(self):
table = t.table

logger.debug("CDDB disc id: %r", table.getCDDBDiscId())
responses = accurip.get_db_entry(table.accuraterip_path())
responses = None
try:
responses = accurip.get_db_entry(table.accuraterip_path())
except accurip.EntryNotFound:
print('Accuraterip entry not found')

if responses:
logger.debug('%d AccurateRip responses found.' % len(responses))

if responses[0].cddbDiscId != table.getCDDBDiscId():
logger.warning("AccurateRip response discid different: %s",
responses[0].cddbDiscId)
Expand Down

0 comments on commit 311084c

Please sign in to comment.