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

loewis@sourceforge.net loewis@sourceforge.net
2002年5月08日 01:56:35 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv8144/Lib
Modified Files:
	ftplib.py 
Log Message:
Patch #553277: Accept callbacks that are callable, not callbacks that are true.
Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** ftplib.py	10 Mar 2002 15:59:58 -0000	1.66
--- ftplib.py	8 May 2002 08:56:33 -0000	1.67
***************
*** 393,397 ****
 with trailing CRLF stripped. This creates a new port for you.
 print_line() is the default callback.'''
! if not 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 not callable(callback): callback = print_line
 resp = self.sendcmd('TYPE A')
 conn = self.transfercmd(cmd)

AltStyle によって変換されたページ (->オリジナル) /