Skip to content

paramiko channel default exit_status indistinguashable from a program error  #489

Closed

Description

@oxpa

Hello.

I had a strange problem with a server either returning "-1" as an exit code or not returning an exit code at all.
These cases are indistinguishable in paramiko: channel.exit_status() returns -1 in either case.

I suppose, it would be useful to change default return value from "-1" to "None", to explicitly denote if there was an exit status from a command. "None" as a default value would allow handling "no exit code" specially, while checks like "if channel.exit_status() <0: handle_errors()" won't be broken.

Please, comment if you support this change: I would send a pull request with code and documentation changes.

Activity

  1. lndbrg commented on Feb 24, 2015

    @lndbrg
    Contributor

    Ah, i definitely see you point. Do send a PR (it's a small one anyway) and we can have the discussion there.

  2. bitprophet commented on Feb 27, 2015

    @bitprophet
    Member

    Rolling into #492

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