~smoser/ubuntu/maverick/cloud-init/lp942961-apt-pipeline

« back to all changes in this revision

Viewing changes to cloudinit/util.py

  • Committer: Scott Moser
  • Date: 2010-06-18 19:48:13 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: smoser@ubuntu.com-20100618194813-1hk4vuin8w2zxypj
Tags: upstream-0.5.12
ImportĀ upstreamĀ versionĀ 0.5.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    if not yobj.has_key(key): return default
54
54
    return yobj[key]
55
55
 
 
56
def get_cfg_option_list_or_str(yobj, key, default=None):
 
57
    if not yobj.has_key(key): return default
 
58
    if isinstance(yobj[key],list): return yobj[key]
 
59
    return([yobj[key]])
 
60
 
56
61
# merge values from src into cand.
57
62
# if src has a key, cand will not override
58
63
def mergedict(src,cand):