Package: gourmet Version: 0.15.6-1 Severity: normal Tags: patch upstream User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3089267&group_id=108118&atid=649654
Hi, Ubuntu has been carrying the following patch to gourmet in response to [0]. It looks like it was forwarded in Bug #530841, but you probably missed it. I've forwarded it upstream. [0]: https://bugs.launchpad.net/ubuntu/+source/gourmet/+bug/431806/comments/24 SR -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- Stefano Rivera http://tumbleweed.org.za/ H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
Description: don't remove a non-active plugin or an entry from a non-existent database Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3089267&group_id=108118&atid=649654 Bug-Ubuntu: https://launchpad.net/bugs/431806 Author: Jamie Strandboge <ja...@ubuntu.com> Last-Update: 2010-10-17 --- a/src/lib/plugin_loader.py +++ b/src/lib/plugin_loader.py @@ -174,7 +174,8 @@ for plugin in plugin_set.plugins: if self.instantiated_plugins.has_key(plugin): self.instantiated_plugins[plugin].remove() - self.active_plugins.remove(plugin) + if plugin in self.active_plugins: + self.active_plugins.remove(plugin) def get_instantiated_plugin (self, plugin): if self.instantiated_plugins.has_key(plugin): --- a/src/lib/plugin.py +++ b/src/lib/plugin.py @@ -243,7 +243,8 @@ self.active = True def remove (self): - self.db.remove_hook(plugin_loader.POST,'setup_tables',self.create_tables) + if hasattr(self, "db"): + self.db.remove_hook(plugin_loader.POST,'setup_tables',self.create_tables) self.active = False def create_tables (self):