pep8 fixes

This commit is contained in:
Thomas Vander Stichele
2012-12-02 16:40:46 +00:00
parent c634dd0e92
commit b86febb3b1
6 changed files with 4 additions and 7 deletions

View File

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

View File

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

View File

@@ -65,7 +65,6 @@ class Program(log.Loggable):
'table')
return path
def loadDevice(self, device):
"""
Load the given device.

View File

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

View File

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

View File

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