Fix so evennia.utils.delay actually returns a deferred as the docstring says.

This commit is contained in:
Griatch 2017-04-25 23:34:44 +02:00
parent d012974650
commit 477d7883c8

View file

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