A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040500.html below:

[Python-Dev] test_mimetools failure when hostname unknown.

[Python-Dev] test_mimetools failure when hostname unknown.Anthony Baxter anthony at ekit-inc.com
Fri Nov 28 23:25:18 EST 2003
If you have a machine who's local hostname is just something you've
set, and there's no matching entry in /etc/hosts, test_mimetools fails
with 
test test_mimetools failed -- Traceback (most recent call last):
  File "/home/anthony/src/py/23maint/Lib/test/test_mimetools.py", line 30, in test_boundary
    nb = mimetools.choose_boundary()
  File "/home/anthony/src/py/23maint/Lib/mimetools.py", line 130, in choose_boundary
    hostid = socket.gethostbyname(socket.gethostname())
gaierror: (-2, 'Name or service not known')

This seems, to me, to be a bit bogus - should we just, in this case,
have some sensible default (maybe just use the hostname, or 127.0.0.1)

And yes, I know this is not strictly a python bug, but it just popped 
up while I was building a new system up.

Anthony

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4