[Yum-devel] [PATCH/RFC] What to do if a plugin fails to load?
katzj at redhat.com
Thu Jun 14 18:30:53 UTC 2007
On Thu, 2007-06-14 at 09:12 +0200, Tim Lauridsen wrote:
> My proposal is this one.
> module = imp.load_module(modname, fp, pathname, description)
> except ImportError:
> raise PluginYumExit('"%s" plugin failed to load; use --disableplugin' % modname)
> --disableplugin=plugin name is a new feature added to current yum CVS Head.
> The GUI's like pirut & yumex can catch the exception and ask the user what to do.
> The CLI just bails out, with a message to the user to solve the issue. Maybe it should print the Stack trace so there is a way to
> se what goes wrong in the plugin.
As Jesse says, asking here is really a recipe for disaster. Also,
continuing after catching the exception is ... hairy
More information about the Yum-devel