summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceConfigDrive.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-09-02 22:46:03 -0700
committerJoshua Harlow <harlowja@gmail.com>2013-09-02 22:46:03 -0700
commit73863ed53d87e0eb3c24449ef164089531bc9679 (patch)
tree47c4bd7b8e9bad1305aa6c9d9249a6805f63d272 /cloudinit/sources/DataSourceConfigDrive.py
parentee9e56a9d286d34b20bbe3de200872d1eee1af38 (diff)
downloadvyos-cloud-init-73863ed53d87e0eb3c24449ef164089531bc9679.tar.gz
vyos-cloud-init-73863ed53d87e0eb3c24449ef164089531bc9679.zip
Ensure data is initialized to a dict if its empty/none
LP: #1198297
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 23f791aa..af205d86 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -47,6 +47,8 @@ class ConfigDriveHelper(object):
self.distro = distro
def on_first_boot(self, data):
+ if not data:
+ data = {}
if 'network_config' in data:
LOG.debug("Updating network interfaces from config drive")
self.distro.apply_network(data['network_config'])