Improve the code to pass setup.py check

This commit is contained in:
Li Fanxi 2010-12-08 02:01:23 +08:00
parent ae60040a39
commit c90f9a1c44
2 changed files with 2 additions and 4 deletions

View File

@ -153,7 +153,6 @@ class BAMBOOK(DeviceConfig, DevicePlugin):
booklist = self.booklist_class(oncard, prefix, self.settings) booklist = self.booklist_class(oncard, prefix, self.settings)
need_sync = self.parse_metadata_cache(booklist) need_sync = self.parse_metadata_cache(booklist)
from calibre.ebooks.metadata.book.base import Metadata
devicebooks = self.bambook.GetBookList() devicebooks = self.bambook.GetBookList()
books = [] books = []
for book in devicebooks: for book in devicebooks:
@ -242,7 +241,6 @@ class BAMBOOK(DeviceConfig, DevicePlugin):
to :meth:`add_books_to_metadata`. to :meth:`add_books_to_metadata`.
''' '''
self.report_progress(0, _('Transferring books to device...')) self.report_progress(0, _('Transferring books to device...'))
booklist = []
paths = [] paths = []
if self.bambook: if self.bambook:
for (i, f) in enumerate(files): for (i, f) in enumerate(files):

View File

@ -9,7 +9,7 @@ Sanda library wrapper
''' '''
import ctypes, uuid, hashlib import ctypes, uuid, hashlib
from threading import Event, Thread, Lock from threading import Event, Lock
from calibre.constants import iswindows, islinux from calibre.constants import iswindows, islinux
try: try:
@ -137,7 +137,7 @@ def BambookDisconnect(handle):
# extern "C" const char * BambookGetErrorString(BB_RESULT nCode) # extern "C" const char * BambookGetErrorString(BB_RESULT nCode)
def BambookGetErrorString(code): def BambookGetErrorString(code):
func = lib_handle.BambookGetErrorString func = lib_handle.BambookGetErrorString
func.restype = c_char_p func.restype = ctypes.c_char_p
return func(code) return func(code)