summaryrefslogtreecommitdiff
path: root/cloudinit/__init__.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/__init__.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/__init__.py')
-rw-r--r--cloudinit/__init__.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py
index 61cbc3cc..d8f2c8c9 100644
--- a/cloudinit/__init__.py
+++ b/cloudinit/__init__.py
@@ -123,7 +123,7 @@ log = logging.getLogger(logger_name)
log.addHandler(NullHandler())
def logging_set_from_cfg_file(cfg_file=system_config):
- logging_set_from_cfg(util.get_base_cfg(cfg_file))
+ logging_set_from_cfg(util.get_base_cfg(cfg_file,cfg_builtin))
def logging_set_from_cfg(cfg, logfile=None):
if logfile is None:
@@ -181,15 +181,7 @@ class CloudInit:
if self.cfg:
return(self.cfg)
- conf = { }
- try:
- stream = file(self.sysconfig)
- conf = yaml.load(stream)
- stream.close()
- except:
- pass
-
- if conf is None: conf = { }
+ conf = util.get_base_cfg(system_config,cfg_builtin)
# support reading the old ConfigObj format file and merging
# it into the yaml dictionary
@@ -201,9 +193,6 @@ class CloudInit:
except:
pass
- if not conf.has_key("cloud_type"):
- conf["cloud_type"]=None
-
return(conf)
def restore_from_cache(self):