cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02747
Re: [Merge] ~smoser/cloud-init:fix/freebsd-test-failure into cloud-init:master
Diff comments:
> diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
> index ebb53d0..e5514ad 100644
> --- a/cloudinit/sources/DataSourceAzure.py
> +++ b/cloudinit/sources/DataSourceAzure.py
> @@ -803,18 +803,22 @@ def encrypt_pass(password, salt_id="$6$"):
> return crypt.crypt(password, salt_id + util.rand_str(strlen=16))
>
>
> +def _check_freebsd_cdrom(cdrom_dev):
> + """Return boolean indicating path to cdrom device has content."""
Where's the return here? it'll return None in all cases right?
> + try:
> + with open(cdrom_dev) as fp:
> + fp.read(1024)
> + devlist.append(cdrom_dev)
> + except IOError:
> + LOG.debug("cdrom (%s) is not configured", cdrom_dev)
> +
> +
> def list_possible_azure_ds_devs():
> devlist = []
> if util.is_FreeBSD():
> - # add '/dev/cd0' to devlist if it is configured
> - # here wants to test whether '/dev/cd0' is available
> cdrom_dev = "/dev/cd0"
> - try:
> - with open(cdrom_dev) as fp:
> - fp.read(1024)
> - devlist.append(cdrom_dev)
> - except IOError:
> - LOG.debug("cdrom (%s) is not configured", cdrom_dev)
> + if _check_freebsd_cdrom(cdrom_dev):
> + return [cdrom_dev]
> else:
> for fstype in ("iso9660", "udf"):
> devlist.extend(util.find_devs_with("TYPE=%s" % fstype))
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/325771
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/freebsd-test-failure into cloud-init:master.
References