def backcomp(arglist):
    """Modify arglist for backwards compatibility"""
    for i in range(len(arglist)):
        if arglist[i] == "attr":
            arglist[i] = "write-attr"
        elif arglist[i] == "--known-endpoints":
            arglist[i] = "--ep-known"
    try:
        arglist.remove("--echo")
    except ValueError:
        pass
    return arglist