Fix TwistedIOLoop on python 2.6.
This commit is contained in:
parent
20afb40419
commit
7431ffe1a0
|
@ -472,7 +472,7 @@ class TwistedIOLoop(tornado.ioloop.IOLoop):
|
|||
if isinstance(deadline, (int, long, float)):
|
||||
delay = max(deadline - self.time(), 0)
|
||||
elif isinstance(deadline, datetime.timedelta):
|
||||
delay = deadline.total_seconds()
|
||||
delay = tornado.ioloop._Timeout.timedelta_to_seconds(deadline)
|
||||
else:
|
||||
raise TypeError("Unsupported deadline %r")
|
||||
return self.reactor.callLater(delay, self._run_callback, wrap(callback))
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -71,6 +71,16 @@ deps =
|
|||
twisted>=12.0.0
|
||||
commands = python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop {posargs:}
|
||||
|
||||
[testenv:py26-twisted]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
futures
|
||||
mock
|
||||
pycurl
|
||||
twisted>=12.3.0
|
||||
unittest2
|
||||
commands = python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop {posargs:}
|
||||
|
||||
[testenv:py27-twisted]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue