Skip to content

Channel with execute complete detection #864

Closed

Description

@vit1251

Hello,

Your class Client provide exec_command() with result is stdin, stdout and stderr, but how to detect error_code_readey and error_code? I never receive channle object and can not call this method.

Could you provide another method with channel return for my purposes or suggest me right way to batch execution?

Thanx.

Activity

  1. bitprophet commented on Dec 14, 2016

    @bitprophet
    Member

    Check out the https://github.com/fabric/fabric codebase for some hints about using high level paramiko stuff (or just use it directly), I don't remember offhand exactly how it does this but it definitely manages.

  2. vit1251 commented on Dec 14, 2016

    @vit1251
    Author

    I discover follow code:

            chan.exec_command(command)
            stdin = chan.makefile('wb', bufsize)
            stdout = chan.makefile('r', bufsize)
            stderr = chan.makefile_stderr('r', bufsize)
            return stdin, stdout, stderr
    

    There is source code provide only stdin, stdout, stderr, but can not provide chan. Could I make pull request with exec_command_2 with return chan?

  3. added 2 commits that reference this issue on Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions