summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-06-17 12:41:12 -0400
committerScott Moser <smoser@ubuntu.com>2010-06-17 12:41:12 -0400
commitceff5f034fd0a826dbd04c058989ed72ba3960a0 (patch)
treefe56cf1761d90ee18587c85d10b95c690792cf88 /cloudinit/util.py
parent367e4c45e3331ccfb05928526581e33936c46516 (diff)
downloadvyos-cloud-init-ceff5f034fd0a826dbd04c058989ed72ba3960a0.tar.gz
vyos-cloud-init-ceff5f034fd0a826dbd04c058989ed72ba3960a0.zip
remove use of cloudinit constants from util.py in get_base_cfg
use get_base_cfg from CloudInit:read_cfg
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index 79115355..0cee8e17 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -33,9 +33,12 @@ def read_conf(fname):
return { }
raise
-def get_base_cfg(cfgfile=cloudinit.system_config):
+def get_base_cfg(cfgfile,cfg_builtin=""):
syscfg = read_conf(cfgfile)
- builtin = yaml.load(cloudinit.cfg_builtin)
+ if cfg_builtin:
+ builtin = yaml.load(cfg_builtin)
+ else:
+ return(syscfg)
return(mergedict(syscfg,builtin))
def get_cfg_option_bool(yobj, key, default=False):