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

SourceForge.net noreply@sourceforge.net
Fri, 04 Apr 2003 04:38:52 -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")





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

>Comment By: Matthew Russell (mattruss)
Date: 2003-04-04 13:38

Message:
Logged In: YES 
user_id=737261

that link should of read:
http://groups.google.com/groups?dq=&start=25&hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&group=comp.lang.python&selm=459f9b68.0304030504.48f0a940%40posting.google.com

sorry

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

Comment By: Matthew Russell (mattruss)
Date: 2003-04-04 13:36

Message:
Logged In: YES 
user_id=737261


The patch i suggested could be applied at a higher level of
abstraction to counter duplication in other connect()'s in
most other Protocols.

Please consider the following argument  (on google):
http://groups.google.com/groups?dq=&start=25&hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&group=comp.lang.python&selm=459f9b68.0304030504.48f0a940%40posting.google.com

The classes ftplib.FTP, telnet.Telnet,
httplib.HTTPConnection are affected. There may be more (?)
NB open function is more or less the same as connect in
telnetlib.






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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-04-03 15:49

Message:
Logged In: YES 
user_id=33168

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

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

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