Diff comments:

> diff --git a/debian/cloud-init.config b/debian/cloud-init.config
> index 6e9c6f7..4c35e50 100644
> --- a/debian/cloud-init.config
> +++ b/debian/cloud-init.config
> @@ -32,13 +32,13 @@ hasEc2Md() {
>  get_yaml_list() {
>       # get_yaml_list(file, key, def): return a comma delimited list with the 
> value
>       # for the yaml array defined in 'key' from 'file'. if not found , 
> return 'def'
> -     # only really supports 'key: [en1, en2 ]' format.
> +     # only really supports 'key: [ en1, en2 ]' or 'key: [en1, en2]' formats.
>       local file="$1" key="$2" default="$3"
>       [ -f "$file" ] || return 1
>       # any thing that didn't match the key is deleted so the final 'p' only
>       # prints things that matched.

or i guess:
  if RET=$(try_python_yaml "$file"); then
    [ -n "$RET" ] || RET="$default"
    return 0
  fi

> -     RET=$(sed -n -e "/^$key:/"'!'d -e "s/$key:[ \[]*//"\
> -             -e "s, \]$,," -e p "$file")
> +     RET=$(sed -n -e "/^$key:/"'!'d -e "s/$key:[[[:space:]]+\[]*//"\
> +        -e "s,[[:space:]]+\]$,," -e p "$file")
>       [ -n "$RET" ] || RET="$default"
>  }
>  


-- 
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/371919
Your team cloud-init commiters is requested to review the proposed merge of 
~raharper/cloud-init:fix/debian-config-yaml-spaces into cloud-init:ubuntu/devel.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to