[PATCH] zeroconf: use util.Abort() instead of deprecated string exceptions

Augie Fackler durin42 at gmail.com
Fri Jun 11 09:03:56 CDT 2010


On Jun 11, 2010, at 7:59 AM, Martin Geisler wrote:

> Benoit Boissinot <bboissin at gmail.com> writes:
>
>> On Fri, Jun 11, 2010 at 1:56 PM, Javi Merino <cibervicho at gmail.com>  
>> wrote:
>>> # HG changeset patch
>>> # User Javi Merino <cibervicho at gmail.com>
>>> # Date 1276257260 -7200
>>> # Node ID 6bd17dc43674b81580d5ff2393d875dbe6df9ba4
>>> # Parent  5bf46516063236efd8a2646643dba9ad3487a109
>>> zeroconf: use util.Abort() instead of deprecated string exceptions
>>>
>>> String exceptions no longer work in python 2.6. This changeset makes
>>> zeroconf use the util.Abort() exception instead.
>>
>> Not sure this is a good idea, it probably shouldn't depend on
>> mercurial libs (it's external code, so it's nice to add new
>> dependencies).
>> Is it something wrong if instead we raise Exception(string) ?
>
> Yeah, I was thinking the same, we should not couple the library closer
> with Mercurial. A plain 'raise Exception' will make check-code  
> complain,
> so perhaps we can add another exception to the module (it already  
> has a
> bunch).

+1, do the right thing and add explicit exception types. Do we know  
where upstream for this module is, or is it essentially unmaintained  
outside of Mercurial? If the latter, does anyone object to the idea of  
making a project on some generic hosting website and picking up some  
kind of maintenance of the module?

>
> -- 
> Martin Geisler
>
> aragost Trifork
> Professional Mercurial support
> http://aragost.com/mercurial/
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list