summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-05-08 08:56:33 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-05-08 08:56:33 (GMT)
commita8dd0941b8becfb48788b333ba2329953a5d90d7 (patch)
tree527b8c0b76b3935d08db5855f8c1445f9f5ef99f /Lib/ftplib.py
parent09bdf72be30aefd71b515ccced5fe7cd6cec154d (diff)
downloadcpython-a8dd0941b8becfb48788b333ba2329953a5d90d7.zip
cpython-a8dd0941b8becfb48788b333ba2329953a5d90d7.tar.gz
cpython-a8dd0941b8becfb48788b333ba2329953a5d90d7.tar.bz2
Patch #553277: Accept callbacks that are callable, not callbacks that are true.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index aaf12fe..ebc88df 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')