Changeset 10079 in genesis for tools


Ignore:
Timestamp:
Mar 10, 2012, 2:12:36 PM (13 years ago)
Author:
rick
Message:

Make sure aliases are properly set.

Fixes ticket:123

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10074 r10079  
    334334  for iface_key in datadump['iface_keys']:
    335335    ifacedump = datadump[iface_key]
    336     interface = ifacedump['interface']
     336    interface = ifacedump['interface'].split(':')[0]
    337337    # By default no special interface mapping
    338338    iface_map[interface] = interface
     
    384384  output += "\n"
    385385  for iface,addrs in sorted(addrs_list.iteritems()):
    386     for addr, comment in addrs:
     386    for addr, comment in sorted(addrs,key=lambda x: parseaddr(x[0].split('/')[0])):
    387387      ifacedump['iface'] = iface
    388388      output += "# %s || %s || %s\n" % (iface, addr, comment)
Note: See TracChangeset for help on using the changeset viewer.