Thanks Pekka. That worked fine.
From: laukpe@... [mailto:laukpe@...] On Behalf Of Pekka
Sent: Tuesday, September 25, 2007 4:17 PM
To: Moore, Greg
Subject: Re: [Jython-users] Exception handling
2007/9/26, Moore, Greg <Greg_W_Moore@...>:
> >>> try:
> ... x =3D socket.gethostbyname("por-wq-moore")
> ... print 'host ip addr: ', x
> ... except gaierror, ge:
> ... print 'something exceptional happened'
> ... print ge
> And got an unexpected:
> Traceback (innermost last):
> File "<console>", line 2, in ?
> NameError: gaierror
You probably should say "from socket import gaierror" before your
This message and any attachments are intended only for the use of the add=
ressee and may contain information that is privileged and confidential. I=
f the reader of the message is not the intended recipient or an authorize=
d representative of the intended recipient, you are hereby notified that =
any dissemination of this communication is strictly prohibited. If you ha=
ve received this communication in error, please notify us immediately by =
e-mail and delete the message and any attachments from your system.