On Tue, 2018-07-17 at 14:52 +0200, Katerina Koukiou wrote: > On Thu, Jul 12, 2018 at 05:19:23PM +0200, Andrea Bolognani wrote: > > - def _action_list(self): > > + def _action_list(self, hosts): > > 'hosts' argument is not used here. Sure, but... > > + def _action_install(self, hosts): > > + flavor = self._config.get_flavor() ... it's used here, and... > > def run(self): > > cmdline = self._parser.parse_args() > > action = cmdline.a > > + hosts = cmdline.h > > > > method = "_action_{}".format(action.replace("-", "_")) > > > > if hasattr(self, method): > > - getattr(self, method).__call__() > > + getattr(self, method).__call__(hosts) > > else: > > raise Error("Invalid action '{}'".format(action)) ... we call all functions implementing actions with the same arguments, so I don't really see a way around it... -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list