From d99a391bd12d9b5bf0549299353ec18f927977c2 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 22 May 2009 20:09:18 +0000 Subject: [PATCH] fix bugs caught by pychecker --- morituri/image/cue.py | 2 +- morituri/image/toc.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/morituri/image/cue.py b/morituri/image/cue.py index d60adc7..758300d 100644 --- a/morituri/image/cue.py +++ b/morituri/image/cue.py @@ -184,7 +184,7 @@ class CueFile(object, log.Loggable): # - check relatively to the cue file # - check only the filename part relative to the cue file if tpath == os.path.abspath(tpath): - candidatePaths.append(tPath) + candidatePaths.append(tpath) else: candidatePaths.append(os.path.join( os.path.dirname(self._path), tpath)) diff --git a/morituri/image/toc.py b/morituri/image/toc.py index e2c1536..dd75cea 100644 --- a/morituri/image/toc.py +++ b/morituri/image/toc.py @@ -177,11 +177,12 @@ class TocFile(object, log.Loggable): # look for SILENCE lines m = _SILENCE_RE.search(line) if m: + length = m.group('length') + self.debug('SILENCE of %r', length) if currentFile is not None: self.debug('SILENCE after FILE, increasing counter') counter += 1 currentFile = None - length = m.group('length') currentLength += common.msfToFrames(length) # look for ZERO lines @@ -319,7 +320,7 @@ class TocFile(object, log.Loggable): # - check relatively to the cue file # - check only the filename part relative to the cue file if tpath == os.path.abspath(tpath): - candidatePaths.append(tPath) + candidatePaths.append(tpath) else: candidatePaths.append(os.path.join( os.path.dirname(self._path), tpath))