Fix for regression in 2.3 connecting with Calibre Companion when deleting books caused by the performance improvement in 829447f01f

This commit is contained in:
Kovid Goyal
2014-09-12 10:50:24 +05:30
parent 2002b18de3
commit 6925fd7a23
@@ -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