diff --git a/sqlor/sor.py b/sqlor/sor.py index 6bdad6d..d62c925 100755 --- a/sqlor/sor.py +++ b/sqlor/sor.py @@ -310,9 +310,10 @@ class SQLor(object): ret = await cur.fetchone() debug(f'coro:sor.fetchone()={ret}, {type(ret)}') return ret - # f = awaitify(cur.fetchone) - ret = cur.fetchone() + ret = await cur.fetchone() debug(f'func:sor.fetchone()={ret}, {type(ret)}') + if isinstance(ret, asyncio.Future): + ret = ret.result() return ret async def execute(self, sql, value):