More specifically, I'm using ftplib and if the server times out, my traditional except Exception as err: is not catching it. I found one solution to use except ftplib.all_errors and it seems to work but I'd like to know if there's a more generic way to catch these "other" exceptions.