[Yum] Can plugin set exit code?

tim.lauridsen at gmail.com tim.lauridsen at gmail.com
Mon Mar 14 18:28:06 UTC 2011

2011/3/14 Miroslav Suchý <msuchy at redhat.com>

> I'm working on:
> https://bugzilla.redhat.com/show_bug.cgi?id=658210
> and I wonder. Is it even possible to set exit code from yum plugin?
> I find that I can register my function to atexit.register() or even use
> close hook. But the question is can I set exit code there?
> I find that I can use there
>  sys.exit(-1)
> but that is not nice, since I will not give chance to other plugins... :(
> --
> Miroslav Suchy
> Red Hat Satellite Engineering
> _______________________________________________
> Yum mailing list
> Yum at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum

A plugin can raise PluginYumExit and yum will exit with RC=1, but this a bad
thing to do in a TYPE_CORE plugin
They are not supposed to exit yum IMO. Because it will break yum API

sys.exit(-1) in a plugin is so BAAAAAAAAAAAAADDDDD :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20110314/b2d1d231/attachment.html>

More information about the Yum mailing list