diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-11-12 09:55:39 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-12 09:55:39 -0500 |
commit | 54828f025dede5d5bc1d26419083e6014f69212e (patch) | |
tree | 5dd2f8d339c0d62024c41ec27ca7f472d0f7e6ba /cloudinit | |
parent | 9de2f909415ad5a5ca4ad3584c73c0e643ba6079 (diff) | |
download | vyos-cloud-init-54828f025dede5d5bc1d26419083e6014f69212e.tar.gz vyos-cloud-init-54828f025dede5d5bc1d26419083e6014f69212e.zip |
add comment to get_instance_userdata reguarding empty/un-provided userdata
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/ec2_utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/ec2_utils.py b/cloudinit/ec2_utils.py index eb5b3884..a278ef04 100644 --- a/cloudinit/ec2_utils.py +++ b/cloudinit/ec2_utils.py @@ -53,6 +53,10 @@ def _unlazy_dict(mp): def get_instance_userdata(api_version, metadata_address): + # Note: boto.utils.get_instance_metadata returns '' for empty string + # so the change from non-true to '' is not specifically necessary, but + # this way cloud-init will get consistent behavior even if boto changed + # in the future to return a None on "no user-data provided". ud = boto_utils.get_instance_userdata(api_version, None, metadata_address) if not ud: ud = '' |