pychecker fixes
This commit is contained in:
@@ -21,11 +21,9 @@
|
||||
# along with morituri. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import struct
|
||||
import zlib
|
||||
|
||||
import gobject
|
||||
import gst
|
||||
|
||||
from morituri.common import common, task
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
# along with morituri. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
"""
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# -*- Mode: Python -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
import os
|
||||
|
||||
def get():
|
||||
return {
|
||||
'isinstalled': True,
|
||||
|
||||
@@ -111,7 +111,7 @@ class CueFile(object, log.Loggable):
|
||||
state = 'TRACK'
|
||||
|
||||
trackNumber = int(m.group('track'))
|
||||
trackMode = m.group('mode')
|
||||
#trackMode = m.group('mode')
|
||||
|
||||
self.debug('found track %d', trackNumber)
|
||||
currentTrack = table.Track(trackNumber)
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
Wrap on-disk CD images based on the .cue file.
|
||||
"""
|
||||
|
||||
import os
|
||||
import struct
|
||||
|
||||
import gst
|
||||
@@ -234,7 +233,7 @@ class AccurateRipResponse(object):
|
||||
self.checksums = []
|
||||
|
||||
pos = 13
|
||||
for i in range(self.trackCount):
|
||||
for _ in range(self.trackCount):
|
||||
confidence = struct.unpack("B", data[pos])[0]
|
||||
checksum = "%08x" % struct.unpack("<L", data[pos + 1:pos + 5])[0]
|
||||
pos += 9
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
Wrap Table of Contents.
|
||||
"""
|
||||
|
||||
import os
|
||||
import struct
|
||||
|
||||
import gst
|
||||
|
||||
from morituri.common import task, common, log
|
||||
|
||||
# FIXME: taken from libcdio, but no reference found for these
|
||||
@@ -166,7 +161,6 @@ class Table(object, log.Loggable):
|
||||
@returns: the length of the given track number, in CD frames
|
||||
@rtype: int
|
||||
"""
|
||||
track = self.tracks[number - 1]
|
||||
return self.getTrackEnd(number) - self.getTrackStart(number) + 1
|
||||
|
||||
def getAudioTracks(self):
|
||||
@@ -362,7 +356,6 @@ class Table(object, log.Loggable):
|
||||
# add the first FILE line
|
||||
path = self.tracks[0].getFirstIndex().path
|
||||
counter = self.tracks[0].getFirstIndex().counter
|
||||
currentPath = path
|
||||
lines.append('FILE "%s" WAVE' % path)
|
||||
|
||||
for i, track in enumerate(self.tracks):
|
||||
@@ -407,8 +400,6 @@ class Table(object, log.Loggable):
|
||||
t = self.tracks[0].number
|
||||
index = self.tracks[0].getFirstIndex()
|
||||
i = index.number
|
||||
# the first cut is the deepest
|
||||
counter = index.counter
|
||||
|
||||
self.debug('clearing path')
|
||||
while True:
|
||||
|
||||
@@ -63,7 +63,7 @@ class ProgressParser(object):
|
||||
"""
|
||||
m = _PROGRESS_RE.search(line)
|
||||
if m:
|
||||
code = int(m.group('code'))
|
||||
# code = int(m.group('code'))
|
||||
function = m.group('function')
|
||||
offset = int(m.group('offset'))
|
||||
if function == 'read':
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
import os
|
||||
import stat
|
||||
import tempfile
|
||||
|
||||
import unittest
|
||||
|
||||
@@ -61,7 +61,6 @@ class TrackSeparateTestCase(unittest.TestCase):
|
||||
self.assertEquals(h(checksumtask.checksums[3]), '0x7271db39')
|
||||
|
||||
def testLength(self):
|
||||
tracks = self.image.cue.table.tracks
|
||||
self.assertEquals(self.image.table.getTrackLength(1), 10)
|
||||
self.assertEquals(self.image.table.getTrackLength(2), 10)
|
||||
self.assertEquals(self.image.table.getTrackLength(3), 10)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- Mode: Python; test-case-name: morituri.test.test_image_table -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from morituri.image import table
|
||||
|
||||
@@ -54,11 +54,6 @@ class CureTestCase(unittest.TestCase):
|
||||
self._assertAbsolute(2, 1, 28324)
|
||||
self._assertPath(1, 1, "data.wav")
|
||||
|
||||
def dump():
|
||||
for t in self.toc.table.tracks:
|
||||
print t
|
||||
print t.indexes.values()
|
||||
|
||||
self.toc.table.absolutize()
|
||||
self.toc.table.clearFiles()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user