From 5741f26926dbba7d32ed9269969553f6a57ff5be Mon Sep 17 00:00:00 2001 From: moritz Date: Thu, 27 Jun 2024 12:32:41 +0200 Subject: [PATCH] =?UTF-8?q?erg=C3=A4nzungen=20von=20Datenbanken=20bei=20Fe?= =?UTF-8?q?hlermeldungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pi-py-Code/protocoll.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Pi-py-Code/protocoll.py b/Pi-py-Code/protocoll.py index 78076de..d8da85e 100644 --- a/Pi-py-Code/protocoll.py +++ b/Pi-py-Code/protocoll.py @@ -36,10 +36,13 @@ def insert_data(temp, sensor_id, config): except mysql.connector.Error as err: if err.errno == errorcode.ER_ACCESS_DENIED_ERROR: print("Etwas ist mit deinem Benutzernamen oder Passwort falsch.") + print(f'Datenbank: {config["host"]}') elif err.errno == errorcode.ER_BAD_DB_ERROR: print("Die Datenbank existiert nicht.") + print(f'Datenbank: {config["host"]}') else: print(err) + print(f'Datenbank: {config["host"]}') if __name__ == '__main__': while True: