[Zope-Checkins] CVS: Zope/ZServer/medusa - http_server.py:1.30.54.1
Brian Lloyd
brian@zope.com
Thu, 20 Jun 2002 11:00:16 -0400
Update of /cvs-repository/Zope/ZServer/medusa
In directory cvs.zope.org:/tmp/cvs-serv32444
Modified Files:
Tag: Zope-2_5-branch
http_server.py
Log Message:
Backported fix for bug #72.
=== Zope/ZServer/medusa/http_server.py 1.30 => 1.30.54.1 ===
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: