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

View File

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