Cleanup, remove some print statements

This commit is contained in:
Charles Haley 2010-05-14 14:52:33 +01:00
parent 96079a712c
commit dc130d56a9
3 changed files with 7 additions and 13 deletions

View File

@ -291,7 +291,6 @@ class BookList(_BookList):
db_id = book.application_id
if db_id is None:
db_id = book.db_id
print 'here', db_id
if db_id is not None:
imap[book.application_id] = sony_id
# filter the list, removing books not on device but on playlist

View File

@ -13,8 +13,7 @@ import os
import re
from calibre.devices.usbms.driver import USBMS
from calibre.devices.usbms.books import Book
from calibre.devices.prs505.books import BookList, fix_ids
from calibre.devices.prs505.books import BookList as PRS_BookList, fix_ids
from calibre.devices.prs505 import MEDIA_XML
from calibre.devices.prs505 import CACHE_XML
from calibre import __appname__
@ -28,6 +27,8 @@ class PRS505(USBMS):
supported_platforms = ['windows', 'osx', 'linux']
path_sep = '/'
booklist_class = PRS_BookList # See USBMS for some explanation of this
FORMATS = ['epub', 'lrf', 'lrx', 'rtf', 'pdf', 'txt']
VENDOR_ID = [0x054c] #: SONY Vendor Id
@ -59,11 +60,6 @@ class PRS505(USBMS):
METADATA_CACHE = "database/cache/metadata.calibre"
def initialize(self):
USBMS.initialize(self) # Must be first, so _class vars are set right
self.booklist_class = BookList
self.book_class = Book
def windows_filter_pnp_id(self, pnp_id):
return '_LAUNCHER' in pnp_id

View File

@ -27,6 +27,10 @@ class USBMS(CLI, Device):
author = _('John Schember')
supported_platforms = ['windows', 'osx', 'linux']
# Store type instances of BookList and Book. We must do this because
# a) we need to override these classes in some device drivers, and
# b) the classmethods seem only to see real attributes declared in the
# class, not attributes stored in the class
booklist_class = BookList
book_class = Book
@ -34,11 +38,6 @@ class USBMS(CLI, Device):
CAN_SET_METADATA = True
METADATA_CACHE = 'metadata.calibre'
def initialize(self):
Device.initialize(self)
# self.booklist_class = BookList
# self.book_class = Book
def get_device_information(self, end_session=True):
self.report_progress(1.0, _('Get device information...'))
return (self.get_gui_name(), '', '', '')