diff options
Diffstat (limited to 'paramiko/sftp_file.py')
-rw-r--r-- | paramiko/sftp_file.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index bc34db94..52f2bde8 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -83,7 +83,7 @@ class SFTPFile (BufferedFile): # __del__.) if self._closed: return - self.sftp._log(DEBUG, 'close(%s)' % u(hexlify(self.handle))) + self.sftp._log(DEBUG, 'close({})'.format(u(hexlify(self.handle)))) if self.pipelined: self.sftp._finish_responses(self) BufferedFile.close(self) @@ -288,7 +288,8 @@ class SFTPFile (BufferedFile): :param int mode: new permissions """ - self.sftp._log(DEBUG, 'chmod(%s, %r)' % (hexlify(self.handle), mode)) + self.sftp._log(DEBUG, 'chmod({}, {!r})'.format( + hexlify(self.handle), mode)) attr = SFTPAttributes() attr.st_mode = mode self.sftp._request(CMD_FSETSTAT, self.handle, attr) @@ -305,7 +306,7 @@ class SFTPFile (BufferedFile): """ self.sftp._log( DEBUG, - 'chown(%s, %r, %r)' % (hexlify(self.handle), uid, gid)) + 'chown({}, {!r}, {!r})'.format(hexlify(self.handle), uid, gid)) attr = SFTPAttributes() attr.st_uid, attr.st_gid = uid, gid self.sftp._request(CMD_FSETSTAT, self.handle, attr) @@ -325,7 +326,8 @@ class SFTPFile (BufferedFile): """ if times is None: times = (time.time(), time.time()) - self.sftp._log(DEBUG, 'utime(%s, %r)' % (hexlify(self.handle), times)) + self.sftp._log(DEBUG, 'utime({}, {!r})'.format( + hexlify(self.handle), times)) attr = SFTPAttributes() attr.st_atime, attr.st_mtime = times self.sftp._request(CMD_FSETSTAT, self.handle, attr) @@ -340,7 +342,7 @@ class SFTPFile (BufferedFile): """ self.sftp._log( DEBUG, - 'truncate(%s, %r)' % (hexlify(self.handle), size)) + 'truncate({}, {!r})'.format(hexlify(self.handle), size)) attr = SFTPAttributes() attr.st_size = size self.sftp._request(CMD_FSETSTAT, self.handle, attr) @@ -473,7 +475,8 @@ class SFTPFile (BufferedFile): .. versionadded:: 1.5.4 """ - self.sftp._log(DEBUG, 'readv(%s, %r)' % (hexlify(self.handle), chunks)) + self.sftp._log(DEBUG, 'readv({}, {!r})'.format( + hexlify(self.handle), chunks)) read_chunks = [] for offset, size in chunks: |