Configobj should be a requirement now, and not optional,

so there is no need to check the import for errors.
This commit is contained in:
harlowja 2012-06-22 08:50:19 -07:00
parent 8891256526
commit 332cd4c126

View File

@ -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", {})