aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Runtime Warning – docker exec

securityhigh opened this issue · comments

https://aiodocker.readthedocs.io/en/latest/_modules/aiodocker/execs.html#Exec.start

def start – not async function
self._start_detached – not awaited

But _start_detached – async function...

My code:
print((await docker.containers.container("e2b07630bfbb").exec("ls")).start(detach=True))

Result:
<coroutine object Exec._start_detached at 0x1064fcd60> /test.py:21: RuntimeWarning: coroutine 'Exec._start_detached' was never awaited print((await docker.containers.container("e2b07630bfbb").exec("ls")).start(detach=True)) RuntimeWarning: Enable tracemalloc to get the object allocation traceback

And break.
I will try to directly interact with this function.