From 87a54127ffa8c0544637724fd082be3584ef08d0 Mon Sep 17 00:00:00 2001 From: prculley Date: Fri, 11 Aug 2017 11:16:36 -0500 Subject: [PATCH] Correct issue with exception on database change in Gramplets Fixes #10147 --- gramps/gen/plug/_gramplet.py | 3 +-- gramps/gen/utils/callback.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gramps/gen/plug/_gramplet.py b/gramps/gen/plug/_gramplet.py index 94bc118fc..34a8dfad9 100644 --- a/gramps/gen/plug/_gramplet.py +++ b/gramps/gen/plug/_gramplet.py @@ -399,8 +399,7 @@ class Gramplet: self.update() def _no_db(self): - if self.dbstate.db.is_open(): - self.disconnect_all() # clear the old signals + self.disconnect_all() # clear the old signals def get_option_widget(self, label): """ diff --git a/gramps/gen/utils/callback.py b/gramps/gen/utils/callback.py index 90dac722f..b2f801cd7 100644 --- a/gramps/gen/utils/callback.py +++ b/gramps/gen/utils/callback.py @@ -311,8 +311,7 @@ class Callback: for key in keymap: self.__callback_map[signal_name].remove(key) self.__callback_map[signal_name] = None - self.__callback_map = None - del self.__callback_map + self.__callback_map = {} def emit(self, signal_name, args=tuple()): """