[PATCH] Polished upgradepath code - minor fixes.
Josef Skladanka
jskladan at redhat.com
Wed Sep 1 09:24:41 UTC 2010
It's just that __init__ should be the place to create
instance-variables - nothing more, nothing less.
I don't have any problem with creating these variables
in the run_once, I just made the first change according
to my customs.
Feel free to change it, and apply to master.
Thanks
Joza
----- Original Message -----
From: "Will Woods" <wwoods at redhat.com>
To: "List for development discussion of the AutoQA project" <autoqa-devel at lists.fedorahosted.org>
Sent: Tuesday, August 31, 2010 6:28:44 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [PATCH] Polished upgradepath code - minor fixes.
This patch looks OK, with one comment:
On Tue, 2010-08-31 at 13:07 +0200, Josef Skladanka wrote:
> - def initialize(self, config):
> - self.config = config_loader(config, self.tmpdir)
> - #URL of logs/results stored on autotest-server
> - self.autotest_url = autoqa.util.make_autotest_url(self.config)
> -
> - def setup(self):
> - pass
> + def __init__(self, *args, **kwargs):
> + super(upgradepath, self).__init__(*args, **kwargs)
> + self.log = []
> + self.envr_list = set()
This is kind of confusing - is there a reason you need to use __init__()
and not initialize(), as suggested by the test template? For example:
def initialize(self, *args, **kwargs):
super(upgradepath, self).initialize(config)
self.log = []
self.envr_list = set()
Even simpler - why not just set self.log and self.envr_list at the top
of run_once()? Then you don't have to worry about running super(...) at
all.
-w
_______________________________________________
autoqa-devel mailing list
autoqa-devel at lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/autoqa-devel
More information about the autoqa-devel
mailing list