def pseudo_uebernehmen(self, name, zu_erfassen): pseudos = str(self.lineEditPseudo.text()).title().split(", ") pseudos = set(pseudos) for i in pseudos: if i and i.strip() != name.title().strip(): res = [] zu_lesen = "SELECT darsteller FROM pordb_darsteller WHERE darsteller = %s" self.lese_func = DBLesen(self, zu_lesen, i.strip().title()) res = DBLesen.get_data(self.lese_func) if res: messageBox = QtGui.QMessageBox() messageBox.addButton(self.trUtf8("Yes"), QtGui.QMessageBox.AcceptRole) messageBox.addButton(self.trUtf8("No"), QtGui.QMessageBox.RejectRole) messageBox.setWindowTitle(i.strip().replace("'", "''").title() +self.trUtf8(": There is another actor in the database with this name.")) messageBox.setIcon(QtGui.QMessageBox.Question) messageBox.setText(self.trUtf8("Do you want to add/change the actor anyway?")) message = messageBox.exec_() if message != 0: return False checkpseudo = CheckPseudos(i.strip().title(), name.strip().title()) check = CheckPseudos.check(checkpseudo) werte = [] werte.append(i.strip().title()) werte.append(name.strip().title()) befehl = "INSERT INTO pordb_pseudo (pseudo, darsteller) VALUES (%s, %s)" if check and befehl not in zu_erfassen: zu_erfassen.append([befehl, werte]) return True