try to load trollius on python2

This commit is contained in:
Unbit
2014-10-17 13:04:17 +02:00
parent ff5a648103
commit 635b37fea4
+5 -1
View File
@@ -328,9 +328,13 @@ static void asyncio_loop() {
uwsgi.schedule_fix = uwsgi_asyncio_schedule_fix;
}
#ifndef UWSGI_PYTHREE
PyObject *asyncio = PyImport_ImportModule("trollius");
#else
PyObject *asyncio = PyImport_ImportModule("asyncio");
#endif
if (!asyncio) uwsgi_pyexit;
uasyncio.mod = asyncio;
uasyncio.loop = PyObject_CallMethod(asyncio, "get_event_loop", NULL);