[PATCH] Teach TUI how to react on async events

Chris Lumens clumens at redhat.com
Thu Feb 21 12:51:15 UTC 2013


> diff --git a/pyanaconda/ui/communication.py b/pyanaconda/ui/communication.py
> index 19e3a24..04bb512 100644
> --- a/pyanaconda/ui/communication.py
> +++ b/pyanaconda/ui/communication.py
> @@ -37,9 +37,13 @@ hubQ = Queue.Queue()
>  # _READY - [spoke_name, justUpdate]
>  # _NOT_READY - [spoke_name]
>  # _MESSAGE - [spoke_name, string]
> +# _INPUT - [string]
> +# _EXCEPTION - [exc]
>  HUB_CODE_READY = 0
>  HUB_CODE_NOT_READY = 1
>  HUB_CODE_MESSAGE = 2
> +HUB_CODE_INPUT = 3
> +HUB_CODE_EXCEPTION = 4
>  
>  # Convenience methods to put things into the queue without the user having to
>  # know the details of the queue.

I'd like to see convenience methods for these two new message types
added, which can then be used in the next patch (and in this one, but I
think it was only in one or two places).

Besides that, this is a pretty complex patch but I think it is okay.  I
wonder if we might later need something like unregister_event_handler or
if that code will be useful elsewhere, but it's certainly not something
to address now.

I'm also curious if AnacondaThread.run might need to be changed in light
of all this threading exception handling you guys have been working on,
and perhaps it's causing some of the problems in the first place.

- Chris


More information about the anaconda-patches mailing list