pylint clean ups

This commit is contained in:
John Schember 2009-01-20 20:54:36 -05:00
parent eba26565b8
commit 02e4e537e4
3 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,7 @@ class CYBOOKG3(USBMS):
return size
return os.path.getsize(obj)
sizes = map(get_size, files)
sizes = [get_size(f) for f in files]
size = sum(sizes)
if on_card and size > self.free_space()[2] - 1024*1024:

View File

@ -191,7 +191,6 @@ class Device(_Device):
self._main_prefix = drives['main'] if 'main' in drives.keys() else None
self._card_prefix = drives['card'] if 'card' in drives.keys() else None
@classmethod
def get_osx_mountpoints(self, raw=None):
if raw is None:
ioreg = '/usr/sbin/ioreg'

View File

@ -34,7 +34,7 @@ class USBMS(Device):
SUPPORTS_SUB_DIRS = False
def __init__(self, key='-1', log_packets=False, report_progress=None):
pass
Device.__init__(self, key, log_packets, report_progress)
def get_device_information(self, end_session=True):
"""
@ -54,7 +54,8 @@ class USBMS(Device):
# Get all books in all directories under the root ebook_dir directory
for path, dirs, files in os.walk(os.path.join(prefix, ebook_dir)):
# Filter out anything that isn't in the list of supported ebook types
# Filter out anything that isn't in the list of supported ebook
# types
for book_type in self.FORMATS:
for filename in fnmatch.filter(files, '*.%s' % (book_type)):
title, author, mime = self.__class__.extract_book_metadata_by_filename(filename)
@ -80,7 +81,7 @@ class USBMS(Device):
return size
return os.path.getsize(obj)
sizes = map(get_size, files)
sizes = [get_size(f) for f in files]
size = sum(sizes)
if on_card and size > self.free_space()[2] - 1024*1024: