def move(availableList, installedList, currentSelection, debug): if currentSelection in availableList: availableList.remove(currentSelection) installedList.append(currentSelection) elif currentSelection in installedList: installedList.remove(currentSelection) installedList.append(currentSelection) return (availableList, installedList) else: if debug == 1: sys.stderr.write("krepos.move: Current selection " + str(currentSelection) + " is not in availableList " + \ str(availableList) + " or installedList " + str(installedList) + "\n") sys.stderr.write("krepos.move: Aborting move, returning unchanged lists.") return (availableList, installedList)