mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improve the code to pass setup.py check
This commit is contained in:
parent
ae60040a39
commit
c90f9a1c44
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user