curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01540
Re: [Merge] ~dbungert/curtin:lp-1925722-v2 into curtin:master
Review: Needs Fixing
Thanks for the MP. I adjusted the commit message a bit. The field in the MP will be used in the git commit log so we have an expected format[1].
This looks good. One comment below about logging when we fail to get a match with the serial.
1. https://curtin.readthedocs.io/en/latest/topics/hacking.html#do-these-things-for-each-feature-or-bug
Diff comments:
> diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
> index c027cbf..52342ff 100644
> --- a/curtin/commands/block_meta.py
> +++ b/curtin/commands/block_meta.py
> @@ -1989,10 +1989,13 @@ def meta_simple(args):
> serial = i.get("serial")
> if serial is None:
> continue
> - grub = i.get("grub_device")
> - diskPath = block.lookup_disk(serial)
> - if grub is True:
> + try:
> + diskPath = block.lookup_disk(serial)
> + except ValueError:
Let's be a little more helpful to users here by logging the exception:
except ValueError as err:
log.DEBUG("Skipping disk '%s': %s", i['id'], err)
> + continue
> + if i.get("grub_device"):
> devpath = diskPath
> + break
>
> devices = args.devices
> bootpt = get_bootpt_cfg(
--
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/401825
Your team curtin developers is subscribed to branch curtin:master.
References