This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients lemburg, loewis
Date 2010-10-14.17:02:02
SpamBayes Score 2.4573694e-07
Marked as misclassified No
Message-id <4CB73789.2010007@v.loewis.de>
In-reply-to <4CB6C181.6070109@egenix.com>
Content
> There are two issues here:

There are two issues, but not here :-)

> 1. socket.gethostname() shouldn't raise an error on Windows, but
>    return the Unicode host name

This is issue 9377, please keep that out of this issue.

> Could someone please check whether using the environment
> variable COMPUTERNAME would work in the described case ?

No - I didn't personally encounter the problem.

> What we could do is use the socket.gethostname() and fall back
> to COMPUTERNAME in case of decoding problems.

I think using socket.gethostname() is conceptually wrong: the
what uname returns is *not* the name the machine has in DNS,
but what is configured in the kernel.
History
Date User Action Args
2010-10-14 17:02:04loewissetrecipients: + loewis, lemburg
2010-10-14 17:02:03loewislinkissue10097 messages
2010-10-14 17:02:02loewiscreate