[Zope-dev] Re: ZConfig change breaks Zope 2 and Zope 3

yuppie y.2005- at wcm-solutions.de
Sun May 8 11:19:56 EDT 2005


Hi Mark!


Mark Hammond wrote:
>>On Windows, this 15 months old change in ZConfig sets the default
>>hostname for inet_address to 'localhost':
> 
> ...
> 
> 
>>So if nobody can tell me why ZConfig was changed, I propose to
> 
> 
> That sounds good to me, as I can't understand why Windows would be different
> here either.

I'm sure you know Windows much better than I, so it's good to know that 
you don't understand that either.

> While looking at this, I stumbled across the following code in
> ZConfig/datatypes.py:
> 
>         ## AJ: We change 'localhost' to '' to force Medusa to use
>         ## any network interface instead of using only 127.0.0.1. This is
>         ## a not totally clean solution :-/ See also Collector #1507.
>         if os.name == 'posix' and 'localhost' in hostname.lower():
>             hostname = ''
> 
> 2 things struck me:
> * 'localhost' in hostname.lower() appears odd - I would expect ==.
> * that we probably want to do that for windows too
> 
> As the comments explicitly reference 1507 and the code references
> 'localhost', it may be worth examining too.

Well. I also stumbled over that code, but after looking at it for a 
while I realized get_default_host_info() is never called. So I'll remove 
those lines, not fix them ;)

Cheers,

	Yuppie



More information about the Zope-Dev mailing list