I'm looking into using ftplib (and possibly ftputil) for doing some automated FTP file syncing. I have a couple of servers to test this against at the moment, but, whilst I'm having a successful conversation with both servers, I get EOFError-s with each error reply. For example: if I try to log in with an incorrect user/pass, I will get the 530 response with everything... but I also get an EOFError; if I login with a correct user/pass or try to dir() after doing so etc., I get no EOFError.
It seems to only appear with error messages. I strongly suspect this may be caused by the servers rather than python: I've not found any mention of this issue elsewhere. I, however, have very little control over the server setup.
I'm asking for ideas:
- Do you know what could be causing the error in the first place?
- If it's server-side, could you be more specific? I won't know if I'll be able to do anything about it until I know what it is...
- How do you think I should handle this? I guess I could add an
except EOFError: pass
before each time I handle an exception, but if you have better/neater ideas I would love to hear them.
Thanks!