From 2cafd9d4f67c94b3c58349de9a5bb7d91ec1506e Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 25 Jul 2020 12:15:48 -0400 Subject: [PATCH] fix non-ascii usernames in _parse_userauth_request() for python2 --- paramiko/auth_handler.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index e0c206830..2ecc83ead 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -418,12 +418,9 @@ def _parse_userauth_request(self, m): username = m.get_text() service = m.get_text() method = m.get_text() - self._log( - DEBUG, - 'Auth request (type={}) service={}, username={}'.format( - method, service, username - ) - ) + self._log(DEBUG, "Auth request (type={!r}) service={!r}, username={!r}".format( + method, service, username + )) if service != 'ssh-connection': self._disconnect_service_not_available() return