Re: Can plugin set exit code?

"[email protected]" <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
2011/3/14 Miroslav Suchý <[email protected]>

> 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
> [email protected]
> 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
applications.

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

Tim

_______________________________________________
Yum mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.