On Fri, 2014-05-02 at 16:39 -0700, Brian C. Lane wrote:
On Fri, May 02, 2014 at 04:56:19PM +0200, Martin Kolman wrote:
> + for c in sorted(categories, key=lambda c: c.title):
> + obj = c()
Is this a leftover? I don't see it being used?
> +
> + for spokeClass in sorted(cats_and_spokes[c], key=lambda s: s.title):
> # Check if this spoke is to be shown in anaconda
> - if not s.should_run(environment, self.data):
> + if not spokeClass.should_run(environment, self.data):
> continue
>
> - spoke = s(self.app, self.data, self.storage, self.payload,
self.instclass)
> + spoke = spokeClass(self.app, self.data, self.storage, self.payload,
self.instclass)
> + spoke.initialize()
>
> if not spoke.showable:
> + spoke.teardown()
> del spoke
> continue
>
> - spoke.initialize()
> -
Initialize needs to be called after showable. If a spoke isn't showable
(eg. software and source during live installs) initialize shouldn't be
run. And teardown isn't needed if initialize is never called.
Other than this, it looks ok to me.
Thanks, fixing locally.