adding STDOUT and STDERR documentation#313
adding STDOUT and STDERR documentation#313dvizzini wants to merge 1 commit intogabrieldemarmiesse:masterfrom
Conversation
|
|
||
| `STDERR` is only used to raise appropriate exceptions when the underlying docker process fails. | ||
|
|
||
| Many of these methods, like `docker.volume.prune`, return `STDOUT` in its raw form. You can ignore the `STDOUT` or perhaps log it. |
There was a problem hiding this comment.
That's not really true. I don't know if it was the purpose of your last PR, but stdout is not returned. If it were to be returned (which is a valid thing to do), we would parse stdout and output a list of volume IDs (strings).
In you last PR, there was run(full_cmd), to return stdout, we would need to do return run(full_cmd), but I believe the best thing to do would be
output = run(full_cmd)
if output == "":
return []
else:
return output.splitlines()There was a problem hiding this comment.
Sorry. I missed something. utils.run returns stdout but docker.volume.prune does not return utils.run.
Agreed it could be nice to do the above, which is what I thought happened when I wrote this addition to the README. It seems a little involved but entirely doable.
Looks like this PR will get a lot bigger, and probably not be done for a bit. :)
(Also, I wrote my previous PR because volume.prune's output was appearing in my program's stdout while no other prune method's was.)
There was a problem hiding this comment.
No worries. I'm not sure many people use the output of docker.volume.prune. So don't worry about it. You can just remove the section concerning docker.volume.prune in this PR and then we can merge it :)
Converts #311 (comment) to
READMEform.