Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 9e52c90

Browse files
JelleZijlstrazhangyangyu
authored andcommitted
ftplib.FTP.retrbinary callback gets a bytes, not a str (pythonGH-652)
1 parent 7bb6ac7 commit 9e52c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/ftplib.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
235235

236236
Retrieve a file in binary transfer mode. *cmd* should be an appropriate
237237
``RETR`` command: ``'RETR filename'``. The *callback* function is called for
238-
each block of data received, with a single string argument giving the data
238+
each block of data received, with a single bytes argument giving the data
239239
block. The optional *blocksize* argument specifies the maximum chunk size to
240240
read on the low-level socket object created to do the actual transfer (which
241241
will also be the largest size of the data blocks passed to *callback*). A

0 commit comments

Comments
 (0)