Message4319

Author amak
Recipients amak, dmbaggett
Date 2009-03-21.11:07:34
SpamBayes Score 6.9591892e-09
Marked as misclassified No
Message-id <1237633656.21.0.886486654347.issue1278@psf.upfronthosting.co.za>
In-reply-to
Content
We follow cpython, and so use the same message as them

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo('somehost', 9999)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: (11001, 'getaddrinfo failed')
>>>

If you can persuade the cpython folks to change their message, then we
can follow.

I don't expect that this will ever change.

Personally, I'd just use something like

err_msg = None
try:
    addr_info = socket.getaddrinfo(host, port, etc)
except socket.gaierror:
    err_msg = "Unknown host"
History
Date User Action Args
2009-03-21 11:07:36amaksetmessageid: <1237633656.21.0.886486654347.issue1278@psf.upfronthosting.co.za>
2009-03-21 11:07:36amaksetrecipients: + amak, dmbaggett
2009-03-21 11:07:35amaklinkissue1278 messages
2009-03-21 11:07:35amakcreate