Gestion retour null dans le json

This commit is contained in:
tfa
2023-07-03 09:26:11 +02:00
parent 2b73d5b251
commit d66213275f

7
tcl.py
View File

@@ -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: