#pruefen ob das Medikament 1 voll ist def fach1voll(): cursor = connection.cursor() cursor.execute("SELECT anzahl,medcount from Medikament where mid=1") resultvoll = cursor.fetchall() cursor.close() for data in resultvoll: if data[0]== 1 and data[1]>=12: print("ERROR: Das Medikament 1 ist leer!!! ") zurueckstellen1() zurueckstellen2() zurueckstellen3() #updatemid() subprocess.call("./mail_1.sh", shell=True) GPIO.cleanup() sys.exit(0) elif data[0]== 2 and data[1]>=11: