mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fixes for handling of the cursor during collections writing.
This commit is contained in:
parent
a7ea428d38
commit
5dd75d0ea6
@ -559,10 +559,10 @@ class PRST1(USBMS):
|
|||||||
|
|
||||||
def update_device_collections(self, connection, booklist, collections,
|
def update_device_collections(self, connection, booklist, collections,
|
||||||
source_id, dbpath):
|
source_id, dbpath):
|
||||||
cursor = connection.cursor()
|
|
||||||
|
|
||||||
if collections:
|
if collections:
|
||||||
db_collections = self.read_device_collections(connection, source_id, dbpath)
|
db_collections = self.read_device_collections(connection, source_id, dbpath)
|
||||||
|
cursor = connection.cursor()
|
||||||
|
|
||||||
for collection, books in collections.items():
|
for collection, books in collections.items():
|
||||||
if collection not in db_collections:
|
if collection not in db_collections:
|
||||||
@ -634,7 +634,6 @@ class PRST1(USBMS):
|
|||||||
cursor.execute(query, t)
|
cursor.execute(query, t)
|
||||||
debug_print('Deleted Collection: ' + collection)
|
debug_print('Deleted Collection: ' + collection)
|
||||||
|
|
||||||
|
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user