From ba605495aceab387562678714f7020980b5be405 Mon Sep 17 00:00:00 2001 From: Toby Harradine Date: Sun, 7 Oct 2018 19:36:35 +1100 Subject: [PATCH] [Dev] Use isawaitable over iscoroutine for [p]debug (#2202) Allows for non-coroutine awaitables (such as config's `_ValueCtxManager`) to be awaited from debug. Signed-off-by: Toby Harradine --- redbot/core/dev_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index 1b17befa9..a32fe2446 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -116,7 +116,7 @@ class Dev(commands.Cog): await ctx.send(box("{}: {!s}".format(type(e).__name__, e), lang="py")) return - if asyncio.iscoroutine(result): + if inspect.isawaitable(result): result = await result self._last_result = result