On 06/03/2019 17:52, Wei Liu wrote:
> diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
> index dc810d55cb..97913f3993 100644
> --- a/tools/pygrub/src/GrubConf.py
> +++ b/tools/pygrub/src/GrubConf.py
> @@ -100,7 +100,7 @@ class _GrubImage(object):
>                  "  initrd: %s\n" %(self.title, self.root, self.kernel,
>                                     self.args, self.initrd))
>      def _parse(self, lines):
> -        map(self.set_from_line, lines)
> +        list(map(self.set_from_line, lines))

Another site which wants a transform into a for loop.

>  
>      def reset(self, lines):
>          self._root = self._initrd = self._kernel = self._args = None
> @@ -462,12 +462,12 @@ class Grub2ConfigFile(_GrubConfigFile):
>          
>  if __name__ == "__main__":
>      if len(sys.argv) < 3:
> -        raise RuntimeError, "Need a grub version (\"grub\" or \"grub2\") and 
> a grub.conf or grub.cfg to read"
> +        raise RuntimeError("Need a grub version (\"grub\" or \"grub2\") and 
> a grub.conf or grub.cfg to read")

As you're editing this anyway, it would be better to switch to

RuntimeError('Need a grub version ("grub" or "grub2") and a grub.conf or 
grub.cfg to read')


To drop the unnecessary escaping.

Otherwise, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to