def save_hw(items, name, hwdir):
    'Save hw items for inspection on the server.'
    try:
        filename = os.path.join(hwdir, name + '.hw')
        pprint.pprint(items, stream=open(filename, 'w'))
    except Exception, xcpt:
        HP.logger.error("exception while saving hw file: %s" % str(xcpt))
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/save_hw/original