Uncatchable socket.error in socket.py (?)
Rune
nospam at the.net
Tue Aug 26 15:12:36 EDT 2003
Irmen de Jong wrote:
>Rune wrote:
>> Now, enough words: What I wonder is: Can I catch that socket.error?
>
>By not doing
>
> from socket import *
>
>but rather
>
> import socket
>
>(and prefixing your code with "socket." where it's needed).
>
>The socket.error you tried to catch is coming from the socket
>object that you placed in your namespace by doing the "from"
>import. And the socket class doesn't have an "error" attribute ;)
Thanks Irmen, but the problem seems to be that the server is actually
crashed before I can catch the exception. There is no connection to
send output to. I have no idea how to avoid this.
Rune
More information about the Python-list
mailing list