patch from sofian brabez to fix hexdump logging in sftp_client.

This commit is contained in:
Robey Pointer 2009-07-19 19:59:55 -07:00
parent e56b36648d
commit 0840d8dd28
1 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,11 @@ class SFTPClient (BaseSFTP):
from_transport = classmethod(from_transport)
def _log(self, level, msg, *args):
super(SFTPClient, self)._log(level, "[chan %s] " + msg, *([ self.sock.get_name() ] + list(args)))
if isinstance(msg, list):
for m in msg:
super(SFTPClient, self)._log(level, "[chan %s] " + m, *([ self.sock.get_name() ] + list(args)))
else:
super(SFTPClient, self)._log(level, "[chan %s] " + msg, *([ self.sock.get_name() ] + list(args)))
def close(self):
"""