[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 <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2018-10-07 19:36:35 +11:00 committed by GitHub
parent 748847d5bf
commit ba605495ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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