Output unicode not bytes in Python3.

This commit is contained in:
Andris Raugulis 2016-10-06 03:42:43 +03:00
parent d0356564d5
commit 76f49d4016

View File

@ -1598,7 +1598,8 @@ def audit(conf, sshv=None):
if err is None:
packet_type, payload = s.read_packet(sshv)
if packet_type < 0:
if payload == b'Protocol major versions differ.':
payload = payload.decode('utf-8')
if payload == u'Protocol major versions differ.':
if sshv == 2 and conf.ssh1:
audit(conf, 1)
return