diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-08-21 13:46:41 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-08-21 13:46:41 -0400 |
commit | a59eba66ede19aa85f53a1d2b67c3ffd8860b449 (patch) | |
tree | 5379ee04ea6951d676871701ddc2baed304e6dcd | |
parent | e8536d7ee30c0ce0c80a83ead8d475a724fd0d32 (diff) | |
download | vyos-cloud-init-a59eba66ede19aa85f53a1d2b67c3ffd8860b449.tar.gz vyos-cloud-init-a59eba66ede19aa85f53a1d2b67c3ffd8860b449.zip |
use url_helper to combine url
This seems cleaner, to avoid duplicate '/' being added.
-rw-r--r-- | cloudinit/sources/DataSourceCloudStack.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py index 08f661e4..1bbeca59 100644 --- a/cloudinit/sources/DataSourceCloudStack.py +++ b/cloudinit/sources/DataSourceCloudStack.py @@ -78,7 +78,8 @@ class DataSourceCloudStack(sources.DataSource): (max_wait, timeout) = self._get_url_settings() - urls = [self.metadata_address + "/latest/meta-data/instance-id"] + urls = [uhelp.combine_url(self.metadata_address, + 'latest/meta-data/instance-id')] start_time = time.time() url = uhelp.wait_for_url(urls=urls, max_wait=max_wait, timeout=timeout, status_cb=LOG.warn) |