summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceOpenStack.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources/DataSourceOpenStack.py')
-rw-r--r--cloudinit/sources/DataSourceOpenStack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceOpenStack.py b/cloudinit/sources/DataSourceOpenStack.py
index bf539091..d4b43f44 100644
--- a/cloudinit/sources/DataSourceOpenStack.py
+++ b/cloudinit/sources/DataSourceOpenStack.py
@@ -194,10 +194,10 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
'timeout': url_params.timeout_seconds})
except openstack.NonReadable as e:
raise sources.InvalidMetaDataException(str(e))
- except (openstack.BrokenMetadata, IOError):
+ except (openstack.BrokenMetadata, IOError) as e:
msg = 'Broken metadata address {addr}'.format(
addr=self.metadata_address)
- raise sources.InvalidMetaDataException(msg)
+ raise sources.InvalidMetaDataException(msg) from e
return result