Fix the call of iscoroutinefunction()

This commit is contained in:
Florent Le Coz 2015-01-05 11:36:24 +01:00
parent 1207c81ab5
commit 225e07eb64

View file

@ -7,12 +7,12 @@ call_soon() ones. These callback are called only once each.
"""
import asyncio
from asyncio import tasks, events
from asyncio import events
import collections
def idle_call(self, callback):
if tasks.iscoroutinefunction(callback):
if asyncio.iscoroutinefunction(callback):
raise TypeError("coroutines cannot be used with idle_call()")
handle = events.Handle(callback, [], self)
self._idle.append(handle)