Handle case of script.at_repeat() immediately calling stop(). Resolves #2061.

This commit is contained in:
Griatch 2020-02-29 12:24:26 +01:00
parent fda51edea6
commit edcd06d531
3 changed files with 21 additions and 10 deletions

View file

@ -3052,7 +3052,8 @@ class CmdScript(COMMAND_DEFAULT_CLASS):
ok = obj.scripts.add(self.rhs, autostart=True)
if not ok:
result.append(
"\nScript %s could not be added and/or started on %s."
"\nScript %s could not be added and/or started on %s "
"(or it started and immediately shut down)."
% (self.rhs, obj.get_display_name(caller))
)
else: