pep8 fixes
This commit is contained in:
@@ -65,7 +65,6 @@ class Config(log.Loggable):
|
||||
self.info('Loaded %d sections from config file' %
|
||||
len(self._parser.sections()))
|
||||
|
||||
|
||||
def setReadOffset(self, vendor, model, release, offset):
|
||||
"""
|
||||
Set a read offset for the given drive.
|
||||
@@ -75,7 +74,8 @@ class Config(log.Loggable):
|
||||
try:
|
||||
section = self._findDriveSection(vendor, model, release)
|
||||
except KeyError:
|
||||
section = 'drive:' + urllib.quote('%s:%s:%s' % (vendor, model, release))
|
||||
section = 'drive:' + urllib.quote('%s:%s:%s' % (
|
||||
vendor, model, release))
|
||||
self._parser.add_section(section)
|
||||
__pychecker__ = 'no-local'
|
||||
read_offset = str(offset)
|
||||
|
||||
@@ -59,6 +59,7 @@ def _getAllDevicePathsStatic():
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def getDeviceInfo(path):
|
||||
try:
|
||||
import cdio
|
||||
@@ -69,4 +70,3 @@ def getDeviceInfo(path):
|
||||
ok, vendor, model, release = device.get_hwinfo()
|
||||
|
||||
return (vendor, model, release)
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ class Program(log.Loggable):
|
||||
'table')
|
||||
return path
|
||||
|
||||
|
||||
def loadDevice(self, device):
|
||||
"""
|
||||
Load the given device.
|
||||
|
||||
@@ -136,7 +136,6 @@ Log files will log the path to tracks relative to this directory.
|
||||
self.stdout.write("Using fallback read offset %d\n" %
|
||||
options.offset)
|
||||
|
||||
|
||||
def do(self, args):
|
||||
prog = program.Program(record=self.getRootCommand().record)
|
||||
runner = task.SyncRunner()
|
||||
|
||||
@@ -237,7 +237,6 @@ CD in the AccurateRip database."""
|
||||
self.getRootCommand().config.setReadOffset(info[0], info[1], info[2],
|
||||
offset)
|
||||
|
||||
|
||||
|
||||
class Offset(logcommand.LogCommand):
|
||||
summary = "handle drive offsets"
|
||||
|
||||
@@ -20,7 +20,7 @@ class OffsetTestCase(tcommon.TestCase):
|
||||
os.unlink(self._path)
|
||||
|
||||
def testAddReadOffset(self):
|
||||
self.assertRaises(KeyError,
|
||||
self.assertRaises(KeyError,
|
||||
self._config.getReadOffset, 'PLEXTOR ', 'DVDR PX-L890SA', '1.05')
|
||||
self._config.setReadOffset('PLEXTOR ', 'DVDR PX-L890SA', '1.05', 6)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user