Changeset 10067 in genesis for tools


Ignore:
Timestamp:
Mar 9, 2012, 8:10:02 PM (13 years ago)
Author:
rick
Message:

Do not edit headers on the config files in indead a whee bit confusing.

Reported-By: huub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tools/gformat.py

    r10060 r10067  
    416416  return datadump
    417417
    418 def store_yaml(datadump):
     418def store_yaml(datadump, header=True):
    419419  """ Store configuration yaml for 'item'"""
    420420  item = datadump['autogen_item']
     
    422422
    423423  f = open(gfile, 'w')
    424   f.write(generate_wleiden_yaml(datadump))
     424  f.write(generate_wleiden_yaml(datadump, header))
    425425  f.close()
    426426
     
    519519
    520520
    521 def generate_wleiden_yaml(datadump):
     521def generate_wleiden_yaml(datadump, header=True):
    522522  """ Generate (petty) version of wleiden.yaml"""
    523523  for key in datadump.keys():
     
    530530          del datadump[key][key2]
    531531     
    532 
    533   output = generate_header("#")
     532  output = generate_header("#") if header else ''
    534533  output += format_wleiden_yaml(datadump)
    535534  return output
     
    902901      for key,datadump in datadumps.iteritems():
    903902        datadump['latitude'], datadump['longitude'] = rdnap.rd2etrs(datadump['rdnap_x'], datadump['rdnap_y'])
    904         store_yaml(datadump)
     903        store_yaml(datadump, header=False)
    905904    elif sys.argv[1] == "list":
    906905      if sys.argv[2] == "nodes":
Note: See TracChangeset for help on using the changeset viewer.