From 54ab4e3863575e07be6acee09c098007c1ad66cd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Feb 2025 20:43:09 +0530 Subject: [PATCH] ... --- src/calibre/gui2/ui.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 1debd4ab00..b0c4c8513a 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -1298,20 +1298,19 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ self.library_view.model().close() try: - try: - if self.content_server is not None: - # If the Content server has any sockets being closed then - # this can take quite a long time (minutes). Tell the user that it is - # happening. - self.show_shutdown_message( - _('Shutting down the Content server. This could take a while...')) - s = self.content_server - self.content_server = None - s.exit() - except: - pass + if self.content_server is not None: + # If the Content server has any sockets being closed then + # this can take quite a long time (minutes). Tell the user that it is + # happening. + self.show_shutdown_message( + _('Shutting down the Content server. This could take a while...')) + s = self.content_server + self.content_server = None + s.exit() except KeyboardInterrupt: pass + except Exception: + pass self.hide_windows() if self._spare_pool is not None: self._spare_pool.shutdown()