From 5ea5f2c931b32ad1776b0dc108009affceea5389 Mon Sep 17 00:00:00 2001 From: harlowja Date: Fri, 22 Jun 2012 08:50:19 -0700 Subject: Configobj should be a requirement now, and not optional, so there is no need to check the import for errors. --- cloudinit/config/cc_landscape.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'cloudinit/config') 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", {}) -- cgit v1.2.3