summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-09-26 12:07:51 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-09-26 12:07:51 -0700
commit98cc1f4c0899bef3277b16b30dd7b00920eba991 (patch)
treea5bea1f4c7184a3d3829f3a93dcbf571691b6117
parentac6aad79da050ce65f0be085a8379338c41d4386 (diff)
parent5d020d42f650c8d845d307d578ba4d31466671be (diff)
Merge branch '2.1' into 2.2
-rw-r--r--paramiko/sftp_client.py2
-rw-r--r--paramiko/sftp_file.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index 51c02365..14b8b58a 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -341,7 +341,7 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
handle = msg.get_binary()
self._log(
DEBUG,
- 'open(%r, %r) -> %s' % (filename, mode, hexlify(handle)))
+ 'open(%r, %r) -> %s' % (filename, mode, u(hexlify(handle))))
return SFTPFile(self, handle, mode, bufsize)
# Python continues to vacillate about "open" vs "file"...
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py
index 337cdbeb..028d894a 100644
--- a/paramiko/sftp_file.py
+++ b/paramiko/sftp_file.py
@@ -30,7 +30,7 @@ import time
from paramiko.common import DEBUG
from paramiko.file import BufferedFile
-from paramiko.py3compat import long
+from paramiko.py3compat import u, long
from paramiko.sftp import (
CMD_CLOSE, CMD_READ, CMD_DATA, SFTPError, CMD_WRITE, CMD_STATUS, CMD_FSTAT,
CMD_ATTRS, CMD_FSETSTAT, CMD_EXTENDED,
@@ -83,7 +83,7 @@ class SFTPFile (BufferedFile):
# __del__.)
if self._closed:
return
- self.sftp._log(DEBUG, 'close(%s)' % hexlify(self.handle))
+ self.sftp._log(DEBUG, 'close(%s)' % u(hexlify(self.handle)))
if self.pipelined:
self.sftp._finish_responses(self)
BufferedFile.close(self)