From cf62d1162b08a9efca9c7a57578f0429c6712906 Mon Sep 17 00:00:00 2001 From: LeClubber Date: Sun, 13 Mar 2022 20:01:42 +0100 Subject: [PATCH] Print que les erreurs --- idiamant/mqtt2idiamant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idiamant/mqtt2idiamant.py b/idiamant/mqtt2idiamant.py index 164850e..edc52f2 100644 --- a/idiamant/mqtt2idiamant.py +++ b/idiamant/mqtt2idiamant.py @@ -54,7 +54,8 @@ class Mqtt2iDiamant(Thread): # Appel de l'API response = requests.post(url, json=data, headers=headers) - print(response) + if 200 != response.status_code: + print("Erreur : " + response.content) def run(self): """ Démarrage du service MQTT """