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)
|
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):
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user