diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index fba450d714..b2ab262323 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -1272,7 +1272,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): self._debug('processed cache. count=', len(books_on_device)) count_of_cache_items_deleted = 0 if self.client_cache_uses_lpaths: - for lpath in self.known_metadata.iterkeys(): + for lpath in tuple(self.known_metadata.iterkeys()): if lpath not in lpaths_on_device: try: uuid = self.known_metadata[lpath].get('uuid', None) @@ -1569,7 +1569,6 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): traceback.print_exc() return None - @synchronous('sync_lock') def synchronize_with_db(self, db, id_, book): from calibre.utils.date import parse_date, is_date_undefined