From: Martin v. Löwis Date: Wed, 8 May 2002 08:56:33 +0000 (+0000) Subject: Patch #553277: Accept callbacks that are callable, not callbacks that are true. X-Git-Tag: v2.3c1~5706 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8dd0941b8becfb48788b333ba2329953a5d90d7;p=python Patch #553277: Accept callbacks that are callable, not callbacks that are true. --- diff --git a/Lib/ftplib.py b/Lib/ftplib.py index aaf12fef6a..ebc88df3b5 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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') diff --git a/Misc/ACKS b/Misc/ACKS index b4135402df..1897e307da 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -226,6 +226,7 @@ John Interrante Ben Jackson Paul Jackson David Jacobs +Geert Jansen Jack Jansen Bill Janssen Drew Jenkins