From 986f9f489dab5fffb259280bdb4b1dea190334a1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Mar 2025 13:45:37 +0530 Subject: [PATCH] ... --- src/calibre/customize/ui.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/calibre/customize/ui.py b/src/calibre/customize/ui.py index 4bb0afbd86..1011a7b903 100644 --- a/src/calibre/customize/ui.py +++ b/src/calibre/customize/ui.py @@ -96,7 +96,7 @@ def disable_plugin_by_name(name: str) -> None: ep = config['enabled_plugins'] if name in ep: ep.remove(name) - config['enabled_plugins'] = ep + config['enabled_plugins'] = ep def disable_plugin(plugin_or_name): @@ -788,10 +788,13 @@ def initialize_plugins(perf=False): external_plugins = config['plugins'].copy() if 'KoboTouchExtended' in external_plugins and is_disabled('KoboTouch') and not is_disabled('KoboTouchExtended'): - # We remove KoboTouchExtended and re-enable KoboTouch so that the Kobo + # We disable KoboTouchExtended and re-enable KoboTouch so that the Kobo # device keeps working even though KoboTouchExtended is blacklisted. - disable_plugin_by_name('KoboTouchExtended') - enable_plugin('KoboTouch') + try: + disable_plugin_by_name('KoboTouchExtended') + enable_plugin('KoboTouch') + except Exception: + traceback.print_exc() for name in BLACKLISTED_PLUGINS: external_plugins.pop(name, None) system_plugins.pop(name, None)