Changeset 10702 in genesis for tools/gformat.py


Ignore:
Timestamp:
May 7, 2012, 6:41:36 AM (13 years ago)
Author:
rick
Message:

Only set the defaults if the hybrid is set, else the cleanup does not work anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10698 r10702  
    9898
    9999  # Use some boring defaults
    100   datadump = { 'service_proxy_normal' : False, 'service_proxy_ileiden' : False, 'service_accesspoint' : True }
     100  datadump = {}
    101101  f = open(gfile, 'r')
    102102  datadump.update(yaml.load(f,Loader=Loader))
     103  if datadump['nodetype'] == 'Hybrid':
     104    defaults = { 'service_proxy_normal' : False, 'service_proxy_ileiden' : False, 'service_accesspoint' : True }
     105    for (key,value) in defaults.iteritems():
     106      if not datadump.has_key(key):
     107        datadump[key] = value
    103108  f.close()
    104109
Note: See TracChangeset for help on using the changeset viewer.