From bc8a1320d7058605581c7f81161ee707e4991b22 Mon Sep 17 00:00:00 2001 From: Oscuro87 Date: Tue, 28 Jan 2020 16:06:06 +0100 Subject: [PATCH] Second candidate fix for https://github.com/evennia/evennia/issues/2039\#issue-555828740 --- evennia/scripts/scripts.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index 977dcb451..a0136ccfb 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -136,12 +136,9 @@ class ExtendedLoopingCall(LoopingCall): the task is not running. """ - if self.running: + if self.running and self.interval > 0: total_runtime = self.clock.seconds() - self.starttime interval = self.start_delay or self.interval - # Fairly naive ZeroDivision error bug workaround, see ticket: https://github.com/evennia/evennia/issues/2039#issue-555828740 - if self.interval == 0: - self.interval = 1 return interval - (total_runtime % self.interval) return None @@ -586,7 +583,6 @@ it should not accept 0 at alln seconds. if `None`, will use the del self.db._manual_pause del self.db._paused_callcount # set new flags and start over - # Avoid intervals lower than zero if interval is not None and interval >= 0: self.interval = interval if repeats is not None: