From 54828f025dede5d5bc1d26419083e6014f69212e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 12 Nov 2012 09:55:39 -0500 Subject: add comment to get_instance_userdata reguarding empty/un-provided userdata --- cloudinit/ec2_utils.py | 4 ++++ 1 file changed, 4 insertions(+) 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 = '' -- cgit v1.2.3