From d66213275f413b5876bb360b00c16d98b8351fe8 Mon Sep 17 00:00:00 2001 From: tfa Date: Mon, 3 Jul 2023 09:26:11 +0200 Subject: [PATCH] Gestion retour null dans le json --- tcl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tcl.py b/tcl.py index 2819155..a5812b9 100644 --- a/tcl.py +++ b/tcl.py @@ -183,7 +183,6 @@ class Tcl(Plugin): subCmd = chunks[1].split("--",1) arret = difflib.get_close_matches(subCmd[0].lower(),arrets,n=1,cutoff=0.8) - self.log.critical(len(subCmd)) if len(arret) == 0: await evt.respond("ArrĂȘt non trouvĂ©") return @@ -265,7 +264,11 @@ class Tcl(Plugin): self.log.info(t.get_name()) if t.get_name() == nomArret: continue - respText += "***Direction " + t.get_name() + if t.get_name() is not None: + respText += "***Direction " + t.get_name() + else: + respText += "***Direction ?" + if t.get_estimated() == True: respText += " (E)***\n" else: