From 477d7883c86440b31bcc75e5c24a06ffdb4ca77f Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 25 Apr 2017 23:34:44 +0200 Subject: [PATCH] Fix so evennia.utils.delay actually returns a deferred as the docstring says. --- evennia/utils/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/utils/utils.py b/evennia/utils/utils.py index 79add32052..05ff24f0ed 100644 --- a/evennia/utils/utils.py +++ b/evennia/utils/utils.py @@ -22,7 +22,7 @@ from os.path import join as osjoin from importlib import import_module from inspect import ismodule, trace, getmembers, getmodule from collections import defaultdict, OrderedDict -from twisted.internet import threads, reactor +from twisted.internet import threads, reactor, task from django.conf import settings from django.utils import timezone from django.utils.translation import ugettext as _ @@ -940,7 +940,7 @@ def delay(timedelay, callback, *args, **kwargs): specified here. """ - return reactor.callLater(timedelay, callback, *args, **kwargs) + return task.deferLater(reactor, timedelay, callback, *args, **kwargs) _TYPECLASSMODELS = None