cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #05718
Re: [Merge] ~chad.smith/cloud-init:cleanup/report-unreadable-instance-data into cloud-init:master
seems sane. one request.
Diff comments:
> diff --git a/cloudinit/cmd/query.py b/cloudinit/cmd/query.py
> index ff03de9..650bc0a 100644
> --- a/cloudinit/cmd/query.py
> +++ b/cloudinit/cmd/query.py
> @@ -106,8 +107,11 @@ def handle_args(name, args):
>
> try:
> instance_json = util.load_file(instance_data_fn)
> - except IOError:
> - LOG.error('Missing instance-data.json file: %s', instance_data_fn)
> + except (IOError, OSError) as e:
> + if e.errno == EACCES:
> + LOG.error('No read permission on %s. Try sudo', instance_data_fn)
no read permission on '%s'
add the single quote here and below i think.
> + else:
> + LOG.error('Missing instance-data file: %s', instance_data_fn)
> return 1
>
> instance_data = util.load_json(instance_json)
--
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/358041
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:cleanup/report-unreadable-instance-data into cloud-init:master.
References