From 7dbaefac22c79e67a52ed3425328c26a89444d64 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 12 Nov 2011 11:23:24 +0530 Subject: [PATCH] ... --- src/calibre/devices/interface.py | 2 ++ src/calibre/devices/prst1/driver.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index d9b52ad9a4..15c9e9c55f 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -256,6 +256,8 @@ class DevicePlugin(Plugin): def set_progress_reporter(self, report_progress): ''' + Set a function to report progress information. + :param report_progress: Function that is called with a % progress (number between 0 and 100) for various tasks If it is called with -1 that means that the diff --git a/src/calibre/devices/prst1/driver.py b/src/calibre/devices/prst1/driver.py index 737371e245..a18c2f0eda 100644 --- a/src/calibre/devices/prst1/driver.py +++ b/src/calibre/devices/prst1/driver.py @@ -503,7 +503,8 @@ class PRST1(USBMS): def upload_book_cover(self, connection, book, source_id): debug_print('PRST1: Uploading/Refreshing Cover for ' + book.title) - if not book.thumbnail or not book.thumbnail[-1]: + if (not book.thumbnail or isinstance(book.thumbnail, ImageWrapper) or + not book.thumbnail[-1]): return cursor = connection.cursor()