summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceCloudSigma.py
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2019-07-10 23:17:12 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-07-10 23:17:12 +0000
commit217c89369c3b16f11333f0090e059f76fc5d7937 (patch)
tree6e1595e7e3cde030d52209362b32bb629ed25191 /cloudinit/sources/DataSourceCloudSigma.py
parent5e4792cd11a4754384bd70e4dc94413976017ae8 (diff)
downloadvyos-cloud-init-217c89369c3b16f11333f0090e059f76fc5d7937.tar.gz
vyos-cloud-init-217c89369c3b16f11333f0090e059f76fc5d7937.zip
Fix a couple of issues raised by a coverity scan
* cc_lxd: fix copy/paste error in debug logging * DataSourceCloudSigma: remove unreachable code * This unreachable code was introduced in a refactor (in 2015) which removed the need for an exception handler, but retained the logging from the exception handler as an unreachable fall-through.
Diffstat (limited to 'cloudinit/sources/DataSourceCloudSigma.py')
-rw-r--r--cloudinit/sources/DataSourceCloudSigma.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/cloudinit/sources/DataSourceCloudSigma.py b/cloudinit/sources/DataSourceCloudSigma.py
index 2955d3f0..df88f677 100644
--- a/cloudinit/sources/DataSourceCloudSigma.py
+++ b/cloudinit/sources/DataSourceCloudSigma.py
@@ -42,12 +42,8 @@ class DataSourceCloudSigma(sources.DataSource):
if not sys_product_name:
LOG.debug("system-product-name not available in dmi data")
return False
- else:
- LOG.debug("detected hypervisor as %s", sys_product_name)
- return 'cloudsigma' in sys_product_name.lower()
-
- LOG.warning("failed to query dmi data for system product name")
- return False
+ LOG.debug("detected hypervisor as %s", sys_product_name)
+ return 'cloudsigma' in sys_product_name.lower()
def _get_data(self):
"""