Smart device driver: Avoid exception when using OPT_COLLECTIONS

Needs proper root cause analysis and fix but at least dont fail in the
meantime.
This commit is contained in:
Kovid Goyal 2025-02-23 08:15:57 +05:30
parent 18bd4f4703
commit 1adcbd02a7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1400,7 +1400,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
self.settings().extra_customization[self.OPT_COLLECTIONS].split(',')]
self._debug('collection attributes', colattrs)
coldict = {}
if colattrs:
if colattrs and hasattr(booklists[0], 'get_collections'):
collections = booklists[0].get_collections(colattrs)
for k,v in iteritems(collections):
lpaths = []