[issue30956] ftplib socket timeout can't be handled

2017-07-18 Thread R. David Murray
R. David Murray added the comment: I would like to leave this issue open. It is clear that the behavior for long timeouts does not match the docs, and that should be investigated if someone has the motivation :) -- resolution: works for me -> stage: resolved -> status: closed ->

[issue30956] ftplib socket timeout can't be handled

2017-07-18 Thread Arlo Clarke
Arlo Clarke added the comment: Thanks David. Lowering the timeout to below 60s seems to have resolved this issue. Or at least the error isn't being thrown anymore. I don't know why the error couldn't be handled in the first place, however. -- resolution: -> works for me stage: ->

[issue30956] ftplib socket timeout can't be handled

2017-07-17 Thread R. David Murray
R. David Murray added the comment: Given: import socket from ftplib import FTP try: ftp = FTP('host.i.know.will.hang.com', timeout=4) except socket.timeout: print('caught') I see 'caught' printed on the console. However, if I increase the timeout to 400, then on both 3.5 tip and 3.6

[issue30956] ftplib socket timeout can't be handled

2017-07-17 Thread Arlo Clarke
New submission from Arlo Clarke: Stack overflow question with full details: https://stackoverflow.com/questions/45150568/python-ftp-socket-timeout-handling Socket timeout in ftplib can't be handled; a program crash occurs even when the relevant code is wrapped in a general catch-all.