summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-09-10 14:32:37 -0400
committerScott Moser <smoser@ubuntu.com>2014-09-10 14:32:37 -0400
commit91a5bf5fb67a147e2f434407d1449e745dc1ba3f (patch)
tree5638753015b8675e53af4b6cabb3cf0d36025bc7 /cloudinit/sources/helpers
parente17823ebeb397110c2163629d9f0f94dbea0c5e4 (diff)
parent67efb99bc8e4628e86aef76fed3411c1cc763571 (diff)
downloadvyos-cloud-init-91a5bf5fb67a147e2f434407d1449e745dc1ba3f.tar.gz
vyos-cloud-init-91a5bf5fb67a147e2f434407d1449e745dc1ba3f.zip
pyflakes fixes.
make pyflakes now passes.
Diffstat (limited to 'cloudinit/sources/helpers')
-rw-r--r--cloudinit/sources/helpers/openstack.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 3c6bb6aa..7b27621c 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -163,10 +163,10 @@ class BaseReader(object):
def _find_working_version(self, version):
try:
- versions_available = self._fetch_available_versions(self)
+ versions_available = self._fetch_available_versions()
except Exception as e:
- LOG.warn("Unable to read openstack versions from %s due to: %s",
- self.base_path, e)
+ LOG.debug("Unable to read openstack versions from %s due to: %s",
+ self.base_path, e)
versions_available = []
search_versions = [version] + list(OS_VERSIONS)
@@ -178,8 +178,8 @@ class BaseReader(object):
break
if selected_version != version:
- LOG.warn("Version '%s' not available, attempting to use"
- " version '%s' instead", version, selected_version)
+ LOG.debug("Version '%s' not available, attempting to use"
+ " version '%s' instead", version, selected_version)
return selected_version
def _read_content_path(self, item):
@@ -239,7 +239,8 @@ class BaseReader(object):
LOG.debug("Failed reading optional path %s due"
" to: %s", path, e)
else:
- LOG.exception("Failed reading mandatory path %s", path)
+ LOG.debug("Failed reading mandatory path %s due"
+ " to: %s", path, e)
else:
found = True
if required and not found:
@@ -420,6 +421,7 @@ class MetadataReader(BaseReader):
if self._versions is not None:
return self.os_versions
found = []
+ version_path = self._path_join(self.base_path, "openstack")
content = self._path_read(version_path)
for line in content.splitlines():
line = line.strip()