[Python-checkins] python/dist/src/Lib ftplib.py,1.67,1.68

rhettinger@sourceforge.net rhettinger@sourceforge.net
Sat, 11 May 2002 22:53:54 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv7734

Modified Files:
	ftplib.py 
Log Message:
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.


Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** ftplib.py	8 May 2002 08:56:33 -0000	1.67
--- ftplib.py	12 May 2002 05:53:51 -0000	1.68
***************
*** 393,397 ****
          with trailing CRLF stripped.  This creates a new port for you.
          print_line() is the default callback.'''
!         if not callable(callback): callback = print_line
          resp = self.sendcmd('TYPE A')
          conn = self.transfercmd(cmd)
--- 393,397 ----
          with trailing CRLF stripped.  This creates a new port for you.
          print_line() is the default callback.'''
!         if callback is None: callback = print_line
          resp = self.sendcmd('TYPE A')
          conn = self.transfercmd(cmd)