[PATCH 3/4] Set ready state properly for text storage spoke

Jesse Keating jkeating at redhat.com
Thu Sep 20 23:23:27 UTC 2012


On 09/20/2012 01:15 AM, Vratislav Podzimek wrote:
>>       @property
>> >+    def ready(self):
>> >+        # By default, the storage spoke is not ready.  We have to wait until
>> >+        # storageInitialize is done.
>> >+        return self._ready and not threadMgr.get("AnaExecuteStorageThread")
> Two points here:
> 1) it would be better to use "threadMgr.get("...") is None"

Why explicitly check against None?  Is there a problem with booling the 
value of it?

> 2) the comment mentions the storageInitialize, which is a target of
> "AnaStorageThread", but you are checking the
> "AnaExecuteStorageThread" (which doesn't make sense for the "ready"
> property)

Good catch, I had wrong thread names everywhere :/

>
> Also one thing that applies to both TUI and GUI -- could we please use
> constants for the names of threads, that are started in one module and
> joined in another one? E.g. having "AnaStorageThread" as a
> STORAGE_INIT_THREAD_NAME constant in the storage module and use it in
> anaconda and GUI/TUI spokes.

This is a also a good point and something I'll look through as part of 
this patch set.

-- 
Jesse Keating
Fedora -- FreedomĀ² is a feature!


More information about the anaconda-patches mailing list