def _write_id(node_id):

    for line in fileinput.input("src/core/config.py", inplace=True):
        if "NODE_ID = None" in line:
            print "NODE_ID = %s\n" % node_id,
            continue

        print line,

    # instead of force loading the config and losing state, just reassign
    config.NODE_ID = node_id
Write the node ID to our config file
dataset/ETHPy150Open hatRiot/PeachOrchard/node/src/core/node_resource.py/_write_id