summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceSmartOS.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-07-24 10:44:21 -0400
committerScott Moser <smoser@ubuntu.com>2013-07-24 10:44:21 -0400
commit0891f6611d1c264220a6f71306802db1e70651fc (patch)
treee0c26fb0a50bcc5a929b86fa13e93315506abe77 /cloudinit/sources/DataSourceSmartOS.py
parenta5a5e81077a39e91ac8a3e2990450e050cf3fff1 (diff)
downloadvyos-cloud-init-0891f6611d1c264220a6f71306802db1e70651fc.tar.gz
vyos-cloud-init-0891f6611d1c264220a6f71306802db1e70651fc.zip
DataSourceSmartOS: fix issue if dmidecode is not present
Diffstat (limited to 'cloudinit/sources/DataSourceSmartOS.py')
-rw-r--r--cloudinit/sources/DataSourceSmartOS.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py
index d6589f57..1ce20c10 100644
--- a/cloudinit/sources/DataSourceSmartOS.py
+++ b/cloudinit/sources/DataSourceSmartOS.py
@@ -72,7 +72,12 @@ class DataSourceSmartOS(sources.DataSource):
return False
self.seed = self.seed
- system_uuid, system_type = dmi_data()
+ dmi_info = dmi_data()
+ if dmi_info is False:
+ LOG.debug("No dmidata utility found")
+ return False
+
+ system_uuid, system_type = dmi_info
if 'smartdc' not in system_type.lower():
LOG.debug("Host is not on SmartOS")
return False