diff options
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceEc2.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py index bc84ef5d..bb6d6fd7 100644 --- a/cloudinit/sources/DataSourceEc2.py +++ b/cloudinit/sources/DataSourceEc2.py @@ -151,6 +151,10 @@ class DataSourceEc2(sources.DataSource): # 'root': '/dev/sda1'} found = None bdm = self.metadata['block-device-mapping'] + if not isinstance(bdm, dict): + LOG.debug("block-device-mapping not a dictionary: '%s'", bdm) + return None + for (entname, device) in bdm.items(): if entname == name: found = device |