diff options
Diffstat (limited to 'paramiko/sftp_file.py')
-rw-r--r-- | paramiko/sftp_file.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index 08003e43..0104d857 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -91,7 +91,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) @@ -293,7 +293,9 @@ 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) @@ -309,7 +311,8 @@ class SFTPFile(BufferedFile): :param int gid: new group id """ self.sftp._log( - DEBUG, "chown(%s, %r, %r)" % (hexlify(self.handle), uid, gid) + DEBUG, + "chown({}, {!r}, {!r})".format(hexlify(self.handle), uid, gid), ) attr = SFTPAttributes() attr.st_uid, attr.st_gid = uid, gid @@ -330,7 +333,9 @@ 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) @@ -344,7 +349,7 @@ class SFTPFile(BufferedFile): :param size: the new size of the file """ self.sftp._log( - DEBUG, "truncate(%s, %r)" % (hexlify(self.handle), size) + DEBUG, "truncate({}, {!r})".format(hexlify(self.handle), size) ) attr = SFTPAttributes() attr.st_size = size @@ -484,7 +489,9 @@ 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: |