summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_landscape.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-22 08:50:19 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-22 08:50:19 -0700
commit5ea5f2c931b32ad1776b0dc108009affceea5389 (patch)
tree6cf3eb61690d0263fe72ed0ac731c9339c632b1a /cloudinit/config/cc_landscape.py
parent3ca68402b5d9fbfeceebe39c92501dc773a335f4 (diff)
downloadvyos-cloud-init-5ea5f2c931b32ad1776b0dc108009affceea5389.tar.gz
vyos-cloud-init-5ea5f2c931b32ad1776b0dc108009affceea5389.zip
Configobj should be a requirement now, and not optional,
so there is no need to check the import for errors.
Diffstat (limited to 'cloudinit/config/cc_landscape.py')
-rw-r--r--cloudinit/config/cc_landscape.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/cloudinit/config/cc_landscape.py b/cloudinit/config/cc_landscape.py
index 99a958b0..906a6ff7 100644
--- a/cloudinit/config/cc_landscape.py
+++ b/cloudinit/config/cc_landscape.py
@@ -22,10 +22,7 @@ import os
from StringIO import StringIO
-try:
- from configobj import ConfigObj
-except ImportError:
- ConfigObj = None
+from configobj import ConfigObj
from cloudinit import util
@@ -48,16 +45,12 @@ LSC_BUILTIN_CFG = {
}
-def handle(name, cfg, cloud, log, _args):
+def handle(_name, cfg, cloud, log, _args):
"""
Basically turn a top level 'landscape' entry with a 'client' dict
and render it to ConfigObj format under '[client]' section in
/etc/landscape/client.conf
"""
- if not ConfigObj:
- log.warn(("'ConfigObj' support not available,"
- " running module %s disabled"), name)
- return
ls_cloudcfg = cfg.get("landscape", {})