Changeset 10041 in genesis for tools


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

Do not chdir as it confuses storing files without an prefix in the WC.

Location:
tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/get-link-traffic.py

    r10040 r10041  
    154154  store = {'snmp' : dict(m_snmp), 'traffic' : dict(m_traffic), 'uptime' : dict(m_uptime)}
    155155  yaml.dump(store,open(DATASTORE,'w'))
     156  logger.info("Stored data at %s" % DATASTORE)
    156157
    157158
  • tools/gformat.py

    r9971 r10041  
    6767def get_proxylist():
    6868  """Get all available proxies proxyX sorting based on X number"""
    69   os.chdir(NODE_DIR)
    70   proxylist = sorted(glob.glob("proxy*"),
     69  proxylist = sorted([os.path.basename(x) for x in glob.glob("%s/proxy*" % NODE_DIR)],
    7170                key=lambda name: int(''.join([c for c in name if c in string.digits])),
    7271                cmp=lambda x,y: x - y)
     
    8281def get_nodelist():
    8382  """ Get all available nodes - sorted """
    84   os.chdir(NODE_DIR)
    85   nodelist = sorted(glob.glob("CNode*"))
     83  nodelist = sorted([os.path.basename(x) for x in glob.glob("%s/CNode*" % NODE_DIR)])
    8684  return nodelist
    8785
Note: See TracChangeset for help on using the changeset viewer.