Commit a6ab487b authored by Matt Behrens's avatar Matt Behrens

#72: start on Windows 95 systems with no network devices

parent 4e57fbc6
......@@ -6,7 +6,7 @@
# All Rights Reserved.
#
RCS_ID = '$Id: http_server.py,v 1.32 2002/06/11 22:02:47 chrism Exp $'
RCS_ID = '$Id: http_server.py,v 1.33 2002/06/20 14:39:34 zigg Exp $'
# python modules
import os
......@@ -578,7 +578,10 @@ class http_server (asyncore.dispatcher):
host, port = self.socket.getsockname()
if not ip:
self.log_info('Computing default hostname', 'warning')
ip = socket.gethostbyname (socket.gethostname())
try:
ip = socket.gethostbyname(socket.gethostname())
except socket.error:
ip = socket.gethostbyname('localhost')
try:
self.server_name = socket.gethostbyaddr (ip)[0]
except socket.error:
......
......@@ -13,6 +13,9 @@ Zope Changes
were bypassed when using medusa directly without importing
ZServer first (as when using monitor_client.py).
- Collector #72: Start on Windows 95 machines with no network
devices installed.
Zope 2.6.0 alpha 1
Features Added
......
......@@ -6,7 +6,7 @@
# All Rights Reserved.
#
RCS_ID = '$Id: http_server.py,v 1.32 2002/06/11 22:02:47 chrism Exp $'
RCS_ID = '$Id: http_server.py,v 1.33 2002/06/20 14:39:34 zigg Exp $'
# python modules
import os
......@@ -578,7 +578,10 @@ class http_server (asyncore.dispatcher):
host, port = self.socket.getsockname()
if not ip:
self.log_info('Computing default hostname', 'warning')
ip = socket.gethostbyname (socket.gethostname())
try:
ip = socket.gethostbyname(socket.gethostname())
except socket.error:
ip = socket.gethostbyname('localhost')
try:
self.server_name = socket.gethostbyaddr (ip)[0]
except socket.error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment