mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Fix two null-plugboard problems
This commit is contained in:
parent
95c9d5956f
commit
c852a65922
@ -1278,7 +1278,7 @@ class DeviceMixin(object): # {{{
|
||||
:param files: List of either paths to files or file like objects
|
||||
'''
|
||||
titles = [i.title for i in metadata]
|
||||
plugboards = self.library_view.model().db.prefs.get('plugboards', None)
|
||||
plugboards = self.library_view.model().db.prefs.get('plugboards', {})
|
||||
job = self.device_manager.upload_books(
|
||||
Dispatcher(self.books_uploaded),
|
||||
files, names, on_card=on_card,
|
||||
|
@ -233,7 +233,7 @@ def save_book_to_disk(id, db, root, opts, length):
|
||||
written = False
|
||||
for fmt in formats:
|
||||
dev_name = 'save to disk'
|
||||
plugboards = db.prefs.get('plugboards', None)
|
||||
plugboards = db.prefs.get('plugboards', {})
|
||||
cpb = None
|
||||
if fmt in plugboards:
|
||||
cpb = plugboards[fmt]
|
||||
|
Loading…
x
Reference in New Issue
Block a user