Skip to content

Conversation

christopherobin
Copy link

Adds a new boolean parameter exec_id to execute to return the execution id as a second value.
That value can then be fed to execute_inspect to get informations about the execution (running status, exit code, etc...).

Usage:

out, exec_id = c.execute(container, ['ls', '/foobar'], exec_id=True)
info = c.execute_inspect(exec_id)
if info.get('ExitCode') == 2:
    raise IOError('Folder /foobar does not exists')

@MiLk
Copy link

MiLk commented Apr 23, 2015

👍

@shin-
Copy link
Contributor

shin- commented Apr 27, 2015

Thanks! I actually took a different approach in #568, but end result is essentially the same.

@shin- shin- closed this Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants