From 8c8a73a1a7dbc4bfea72db104bf9ae5b43b08563 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 7 Feb 2021 14:49:10 +0100 Subject: [PATCH] event: Fix compilation with Python 2.7 --- panda/src/event/pythonTask.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/event/pythonTask.cxx b/panda/src/event/pythonTask.cxx index f9295b7aaf..f25ab4837a 100644 --- a/panda/src/event/pythonTask.cxx +++ b/panda/src/event/pythonTask.cxx @@ -585,10 +585,12 @@ do_python_task() { return DS_done; } +#if PY_VERSION_HEX >= 0x03050000 } else if (result == Py_None && PyCoro_CheckExact(_generator)) { // Bare yield from a coroutine means to try again next frame. Py_DECREF(result); return DS_cont; +#endif } else if (DtoolInstance_Check(result)) { // We are waiting for an AsyncFuture (eg. other task) to finish.