mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Patch #553277: Accept callbacks that are callable, not callbacks that are true.
This commit is contained in:
parent
09bdf72be3
commit
a8dd0941b8
2 changed files with 2 additions and 1 deletions
|
@ -392,7 +392,7 @@ class FTP:
|
|||
The callback function (2nd argument) is called for each line,
|
||||
with trailing CRLF stripped. This creates a new port for you.
|
||||
print_line() is the default callback.'''
|
||||
if not callback: callback = print_line
|
||||
if not callable(callback): callback = print_line
|
||||
resp = self.sendcmd('TYPE A')
|
||||
conn = self.transfercmd(cmd)
|
||||
fp = conn.makefile('rb')
|
||||
|
|
|
@ -226,6 +226,7 @@ John Interrante
|
|||
Ben Jackson
|
||||
Paul Jackson
|
||||
David Jacobs
|
||||
Geert Jansen
|
||||
Jack Jansen
|
||||
Bill Janssen
|
||||
Drew Jenkins
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue