diff --git a/morituri/image/image.py b/morituri/image/image.py index dc3cafef..33c166ad 100644 --- a/morituri/image/image.py +++ b/morituri/image/image.py @@ -201,6 +201,9 @@ def stop(self): self.setException(taskk.exception) break + if taskk.length is None: + raise ValueError("Track length was not found; look for " + "earlier errors in debug log (set RIP_DEBUG=4)") # print '%d has length %d' % (trackIndex, taskk.length) index = track.indexes[1] assert taskk.length % common.SAMPLES_PER_FRAME == 0 diff --git a/morituri/rip/main.py b/morituri/rip/main.py index b6f82be3..93ad0001 100644 --- a/morituri/rip/main.py +++ b/morituri/rip/main.py @@ -45,7 +45,10 @@ def main(): 'rip: error: Could not create encoded file.\n') return 255 - raise + # in python3 we can instead do `raise e.exception` as that would show + # the exception's original context + sys.stderr.write(e.exceptionMessage) + return 255 except command.CommandError, e: sys.stderr.write('rip: error: %s\n' % e.output) return e.status