[Patches] [ python-Patches-714592 ] timeouts for FTP connect (and other supported ops)

SourceForge.net noreply@sourceforge.net
Thu, 03 Apr 2003 04:51:51 -0800


Patches item #714592, was opened at 2003-04-03 13:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=714592&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthew Russell (mattruss)
Assigned to: Nobody/Anonymous (nobody)
Summary: timeouts for FTP connect (and other supported ops)

Initial Comment:
This patch attempts to provide users with support for
enabling the timeout feature on the undlying socket.

new parameter added to the __init__ and connect().

i have tested this only briefly.

ftp = ftplib.FTP()
ftp.connect(host="ftp.python.org", timeout=2)
ftp.settimeout(0.01)
->  Error socket.error: (11, 'Resource temporarily
unavailable')
ftp.settimeout(1.2)
ftp.login("anonymous")





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=714592&group_id=5470