[PATCH 3 of 8 v2] cleanup: replace hasattr() usage with getattr() in hghave

Bryan O'Sullivan bos at serpentine.com
Sat May 12 12:38:23 CDT 2012


On Sat, May 12, 2012 at 10:32 AM, Augie Fackler <raf at durin42.com> wrote:

>
> hasattr() on Python < 3 is hopelessly broken. It catches all exception
> types, not just AttributeError (even KeyboardInterrupt and friends.)
>

But why not use util.safehasattr there?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120512/356d3f22/attachment.html>


More information about the Mercurial-devel mailing list