def move(availableList, installedList, currentSelection, debug): if currentSelection in availableList: availableList.remove(currentSelection) installedList.append(currentSelection) # Here elif currentSelection in installedList: installedList.remove(currentSelection) installedList.append(currentSelection) # and here, depending on which list the selection is in, so that they dont affect each other. 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)