Keith,

aimdns and aimdnsd do not actually know about pybonjour (i.e., no import, no 
pybojour calls, ...).
Thus I wanted to keep the pybonjour exception with the pybonjour code in 
aimdns_mod.py.
Does that make sense?

I could also check to see if the dns/multicast service is enabled and exit 
nicely from aimdns and
aimdnsd when it is not.  Would that make more sense to you?

Thanks,

John

On Mar 17, 2011, at 11:04 AM, Keith Mitchell wrote:

> Hi John,
> 
> Is there a reason this approach is taken vs catching the pybonjour error from 
> the aimdns/d? I don't see the advantage to adding so many try/except blocks. 
> Propagating the pybonjour error would also allow callers to, if they so 
> choose, differentiate their error handling based on the source of the error. 
> As an example, one could catch pybonjour and print a message about the 
> multicast service probably not being enabled (just an example, not 
> necessarily suggesting it).
> 
> - Keith
> 
> On 03/17/11 10:51 AM, John Fischer wrote:
>> All,
>> 
>> Can I get a code review for CR:
>> 
>>    http://monaco.sfbay.sun.com/detail.jsf?cr=7028358
>> 
>> The webrev is located at:
>> 
>>    http://cr.opensolaris.org/~johnfisc/7028358-aimdns-traceback/index.html
>> 
>> This issue is caused by the svc:/network/dns/multicast:default SMF service
>> not being enabled.  Thus when aimdns or aimdnsd are ran pybonjour raises
>> an exception.  The solution is to catch the exception within the aimdsn_mod
>> module and raise AIMDNSError which is already caught by both aimdns and
>> aimdnsd.
>> 
>> Thanks,
>> 
>> John
>> _______________________________________________
>> caiman-discuss mailing list
>> [email protected]
>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
> 

_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to