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

Martin Geisler mg at aragost.com
Fri Jun 11 07:59:18 CDT 2010


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).

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list