Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

sshconnection cmd() should give option to separate or combine stderr/stdout #252

@nephomaniac

Description

@nephomaniac

Currently sshconnection.cmd() currently combines stdout and stderr. This was originally done to simplify test scripts and debugging output. This is now a limiting function. For example:
It is currently preventing further dev/testing of sudo prefixed commands. When sudo prefixed commands are executed, warnings related to localhost resolution, etc. to stderr prevent output to stdout from being parsed correctly.
Recommending:
1)Make combining stderr w/ stdout an option for cmd() and probably false by default. stderr should be provided as separate item in the returned dict.

2)Make both stdout and stderr accessible to any ssh cmd callbacks provided to the cmd.

3)sshconnection.sys() can expose this flag but by default should only show stderr as the result of a CommandExitCodeException in the exception.

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