From a4bad326bc4032ff257f964df6d86681654c1259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Thu, 13 Aug 2009 13:31:36 +0200 Subject: Make plugins more exception aware and exception safe --- plugins/package_details.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/package_details.py') diff --git a/plugins/package_details.py b/plugins/package_details.py index 6a17f1e..7d739a3 100644 --- a/plugins/package_details.py +++ b/plugins/package_details.py @@ -23,13 +23,20 @@ class Detail (WidgetPlugin): """ __author__ = "René 'Necoro' Neumann" + _view_ = None _old_pkg = None + _widget_ = None + _widget_name_ = None def init(self): + raise Exception, "e" self.add_call("update_table", self._update, type = "after") def widget_init (self): + if (self._widget_ is None) or (self._widget_name_ is None): + raise PluginLoadException, ("Has not set _widget_ or _widget_name_.") + self.add_widget("Package Notebook", (self._widget_, self._widget_name_)) # if the detail was updated before it was actually initialized, update it again :) -- cgit v1.2.3