I am trying to catch this particular exception (and only this exception) in Python 2.7, but I can\'t seem to find documentation on the exception class. Is there one?
The error type is socket.error, the documentation is here. Try modiffying your code like this:
import socket
import errno
try:
Deleting filename
self.ftp.delete(filename)
return True
except (error_reply, error_perm, error_temp):
return False
except socket.error as error:
if error.errno == errno.WSAECONNRESET:
reconnect()
retry_action()
else:
raise