From 1adcbd02a78de680d37df275ecfe5ed809b53815 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 23 Feb 2025 08:15:57 +0530 Subject: [PATCH] Smart device driver: Avoid exception when using OPT_COLLECTIONS Needs proper root cause analysis and fix but at least dont fail in the meantime. --- src/calibre/devices/smart_device_app/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 4ded9131fa..87cec1652b 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -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 = []