[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [master] Keep dracut settings in sets instead of many long strings.



Overall, I like it.  One question though.

> @@ -865,18 +804,23 @@ class BootLoader(object):
>                                                "setting boot args for network "
>                                                "storage device")
>  
> -                    setup_string = network.dracutSetupString(dep).strip()
> -                    self.boot_args.append(setup_string)
> -                    self.dracut_args.append(setup_string)
> +                    setup_args = network.dracutSetupArgs(dep)
> +                    self.boot_args.update(setup_args)
> +                    self.dracut_args.update(setup_args)
>  
> -        self.boot_args.extend(dracut_storage.values())
> -        self.dracut_args.extend(dracut_storage.values())
> +        self.boot_args.update(dracut_storage.values())
> +        self.dracut_args.update(dracut_storage.values())
>  
>          # passed-in objects
>          for cfg_obj in list(args) + kwargs.values():
> -            setup_string = cfg_obj.dracutSetupString().strip()
> -            self.boot_args.append(setup_string)
> -            self.dracut_args.append(setup_string)
> +            if hasattr(cfg_obj, "dracutSetupArgs"):
> +                setup_args = cfg_obj.dracutSetupArgs()
> +                self.boot_args.update(setup_args)
> +                self.dracut_args.update(setup_args)
> +            else:
> +                setup_string = cfg_obj.dracutSetupString()
> +                self.boot_args.add(setup_string)
> +                self.dracut_args.add(setup_string)

Does this mean you're leaving some dracutSetupString methods around?
If so, why not convert them as well.  If not, is this just code you had
in for testing?

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]