- Notifications
You must be signed in to change notification settings - Fork154
Open
Description
For general questions please use themail group.
Describe the bugAuthenticationError (and maybe other exceptions) is rendered in a confusing way when printed (or converted to string. It looks like:
('Authentication error while connecting to %s:%s - %s - retries %s/%s', 'host.example.com', 22, AuthenticationError('No authentication methods succeeded'), 3, 3)To Reproduce
Steps to reproduce the behavior:
- Example code that produces error:
python -c 'from pssh.clients import SSHClient; SSHClient("localhost", user="_dummy_").run_command("echo")'- Stack trace or error messages.
... File ".../site-packages/pssh/clients/base/single.py", line 271, in _auth_retry raise AuthenticationError(msg, self.host, self.port, ex, retries, self.num_retries)pssh.exceptions.AuthenticationError: ('Authentication error while connecting to %s:%s - %s - retries %s/%s', 'localhost', 22, AuthenticationError('No authentication methods succeeded'), 3, 3)Expected behavior
I think it would be better if exception was rendered with all pieces combined like
pssh.exceptions.AuthenticationError: Authentication error while connecting to localhost:22 - AuthenticationError('No authentication methods succeeded') - retries 3/3Actual behaviour
Exception is printed like a tuple.
Additional information
>>> pssh.__version__'0+untagged.23.g024d798.dirty'>>> ssh2.__version__'1.1.1'