On 12/04/2013 03:02 PM, James Antill wrote:
Without resorting to
"sys.exit(0)" is there another way to gracefully stop Yum execution?
No, not really.
too bad :( Any chance of integrating optional exit code into
PluginYumExit code and the exception handling routines? ;) I can tinker
a bit to provide a patch if you wish.
I'm not dying to do that, but note that raising that exception doesn't
buy you much over just calling sys.exit() _anyway_.
well it does try to close RPMDB and remove locks the way I read it. But
I think I know what you're after.
I would highly recommend you do it the other way, have python code you
own be the top level and create YumBase() instances/etc. ... then call
whichever functions you want (enabling/disabling other plugins) and exit
when you want. Look at the latest yum-cron for an ok skeleton.
thanks for the pointer.
The "main" reason to use a plugin instead of calling the API directly
is that you get all the yum UI for free, and it's a little bit easier to
get something going for small enhancements.
The former doesn't apply to you, and esp. with yum-cron to look at the
later doesn't really either.
understood
_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel