After pylint

This commit is contained in:
Charles Haley 2010-05-13 22:17:52 +01:00
parent d1c040d546
commit 5c9e2ae267
2 changed files with 6 additions and 2 deletions

View File

@ -110,7 +110,7 @@ class BookList(_BookList):
return child return child
return None return None
def add_book(self, book, collections): def add_book(self, book, collections=None):
if book in self: if book in self:
return return
""" Add a node into the DOM tree, representing a book """ """ Add a node into the DOM tree, representing a book """
@ -267,6 +267,11 @@ class BookList(_BookList):
pli.parentNode.removeChild(pli) pli.parentNode.removeChild(pli)
pli.unlink() pli.unlink()
def set_tags(self, book, tags):
tags = [t for t in tags if t]
book.tags = tags
self.set_playlists(book.id, tags)
def set_playlists(self, id, collections): def set_playlists(self, id, collections):
self.remove_from_playlists(id) self.remove_from_playlists(id)
for collection in set(collections): for collection in set(collections):

View File

@ -77,7 +77,6 @@ class PRS505(USBMS):
return fname return fname
def sync_booklists(self, booklists, end_session=True): def sync_booklists(self, booklists, end_session=True):
print 'in sync_booklists'
fix_ids(*booklists) fix_ids(*booklists)
if not os.path.exists(self._main_prefix): if not os.path.exists(self._main_prefix):
os.makedirs(self._main_prefix) os.makedirs(self._main_prefix)