From e4ca5c0a7f50e468e62d17ca52fa935ca86e28b3 Mon Sep 17 00:00:00 2001 From: Samantha Baldwin Date: Sat, 9 Sep 2017 15:12:00 -0400 Subject: [PATCH] fix bare raise, fix fencepost error --- whipper/command/cd.py | 5 ++--- whipper/command/offset.py | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/whipper/command/cd.py b/whipper/command/cd.py index 4d4ae41..f2eefb9 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -429,10 +429,9 @@ Log files will log the path to tracks relative to this directory. if trackResult.testcrc == trackResult.copycrc: sys.stdout.write('CRCs match for track %d\n' % number) else: - sys.stdout.write( - 'ERROR: CRCs did not match for track %d\n' % number + raise RuntimeError( + "CRCs did not match for track %d\n" % number ) - raise sys.stdout.write( 'Peak level: {:.2%} \n'.format(trackResult.peak)) diff --git a/whipper/command/offset.py b/whipper/command/offset.py index c1cac15..91f3862 100644 --- a/whipper/command/offset.py +++ b/whipper/command/offset.py @@ -146,8 +146,7 @@ CD in the AccurateRip database.""" # now try and rip all other tracks as well, except for the # last one (to avoid readers that can't do overread - # for track in range(2, (len(table.tracks) + 1) - 1): - for track in range(2, (len(table.tracks) + 1)): + for track in range(2, (len(table.tracks) + 1) - 1): try: archecksums = self._arcs(runner, table, track, offset) except task.TaskException, e: