fix bugs caught by pychecker

This commit is contained in:
Thomas Vander Stichele
2009-05-22 20:09:18 +00:00
parent 42902fa2c5
commit d99a391bd1
2 changed files with 4 additions and 3 deletions

View File

@@ -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))

View File

@@ -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))