From 59883bb25263318b25a817cc6e5af2b1a1246443 Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Mon, 13 Mar 2017 11:06:58 +0800 Subject: [PATCH] ftplib.FTP.retrbinary callback gets a bytes, not a str (GH-652) (GH-658) --- Doc/library/ftplib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index a0cbe93e3a..f0e19bde45 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -228,7 +228,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. Retrieve a file in binary transfer mode. *cmd* should be an appropriate ``RETR`` command: ``'RETR filename'``. The *callback* function is called for - each block of data received, with a single string argument giving the data + each block of data received, with a single bytes argument giving the data block. The optional *blocksize* argument specifies the maximum chunk size to read on the low-level socket object created to do the actual transfer (which will also be the largest size of the data blocks passed to *callback*). A -- 2.50.1