Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh: better error reporting on SshSession errors #515

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

koreno
Copy link
Collaborator

@koreno koreno commented Sep 10, 2020

We fail so frequently on various ssh configuration problems, and yet the error messages are mostly uninformative:

01:59:07 | No stderr result detected. Does the remote have Bash as the default shell?
...
01:59:07 |   */plumbum/machines/session.py:277 ................................ run >> return run_proc(self.popen(cmd), retcode)
01:59:07 |   */plumbum/commands/processes.py:292 ......................... run_proc >> stdout, stderr = proc.communicate()
01:59:07 |   */plumbum/machines/session.py:136 ........................ communicate >> msgerr) if name == "2" else SSHCommsError(msg)

It seems that the code was not ready for various other return codes

@koreno koreno requested a review from henryiii September 10, 2020 11:28
@coveralls
Copy link

coveralls commented Sep 10, 2020

Coverage Status

Coverage decreased (-0.05%) to 29.093% when pulling b600191 on ssh-machine-errors into 99a9e6e on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+4.2%) to 33.374% when pulling b600191 on ssh-machine-errors into 99a9e6e on master.

@henryiii henryiii closed this Sep 10, 2020
@henryiii henryiii reopened this Sep 10, 2020
@henryiii
Copy link
Collaborator

(retriggering the CI)

@henryiii
Copy link
Collaborator

This seems to break PyPy?

@henryiii
Copy link
Collaborator

henryiii commented Sep 11, 2020

I'm happy to try to move to GHA which will upgrade PyPy (this is 7.1.1-beta ?), then we can investigate. It might be that you can't do multiple inheritance on PyPy for the exceptions?

(But I'm currently moving, so might be a week or two)

@henryiii henryiii merged commit 2976a0c into master Oct 6, 2020
@henryiii henryiii deleted the ssh-machine-errors branch October 6, 2020 20:10
@henryiii henryiii added this to the v1.7.0 milestone Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants