[master/f20-branch][PATCH] Handle packaging exits in a better way

Vratislav Podzimek vpodzime at redhat.com
Wed Oct 16 08:11:43 UTC 2013


On Tue, 2013-10-15 at 14:00 -0400, Chris Lumens wrote:
> > For various reasons we shouldn't call sys.exit() from a non-main thread. But
> > since we need some packaging threads to stop right in the middle and deep in the
> > stack, the only way that works the same as sys.exit() is raising an exception.
> > A special exception that is caught and "translated" into a sys.exit() call from
> > the main thread.
> > 
> > This way, packaging doesn't need to have a clue about our queues and exit
> > handling.
> 
> I like this approach - and especially the bit about getting rid of all
> those sleep loops.  Will we ever care about why the payload cannot
> continue?
In the code we have now, it's always user request. But maybe I should
add messages and some logging. What about this:

class CannotContinueError(PayloadError):
    def __init__(self, msg=""):
        PayloadError.__init__(self, msg)
        log.info("Payload cannot continue: %s", msg)

? Together with passing messages when raising the exception.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list