mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix problem with EXTRA_CUSTOMIZATION lists when there was no customization before.
This commit is contained in:
parent
8d38075e3b
commit
08a59b31c2
@ -106,9 +106,10 @@ class DeviceConfig(object):
|
||||
def settings(cls):
|
||||
opts = cls._config().parse()
|
||||
if isinstance(cls.EXTRA_CUSTOMIZATION_DEFAULT, list):
|
||||
if opts.extra_customization is None:
|
||||
opts.extra_customization = []
|
||||
if not isinstance(opts.extra_customization, list):
|
||||
opts.extra_customization = [opts.extra_customization]
|
||||
else:
|
||||
for i,d in enumerate(cls.EXTRA_CUSTOMIZATION_DEFAULT):
|
||||
if i >= len(opts.extra_customization):
|
||||
opts.extra_customization.append(d)
|
||||
|
Loading…
x
Reference in New Issue
Block a user