You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
paramiko channel default exit_status indistinguashable from a program error #489
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
lndbrg commentedon Feb 24, 2015
Ah, i definitely see you point. Do send a PR (it's a small one anyway) and we can have the discussion there.
bitprophet commentedon Feb 27, 2015
Rolling into #492