summaryrefslogtreecommitdiff
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-05-12 05:53:51 +0000
committerRaymond Hettinger <python@rcn.com>2002-05-12 05:53:51 +0000
commit203f586d6c16c579db3729c7b53347a713da89e7 (patch)
treeca6ec70a58e53c7520bc65451666a29c26195684 /Lib/ftplib.py
parente91b4a0261ec5d22e7487915f06935d1b5071c28 (diff)
downloadcpython-203f586d6c16c579db3729c7b53347a713da89e7.tar.gz
Closes SF patch 553277. Per GvR, reverting to original patch -- the way to
test if 'callable' has not been supplied is to test for None instead of False. The previous correction to 'if callable()' was wrong because an unusable callback would be ignored rather than raising an exception.
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 ebc88df3b5..2ccfbcbffc 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 callable(callback): callback = print_line
+ if callback is None: callback = print_line
resp = self.sendcmd('TYPE A')
conn = self.transfercmd(cmd)
fp = conn.makefile('rb')