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

Bryan O'Sullivan bos at serpentine.com
Sat May 12 12:01:41 CDT 2012


On Sat, May 12, 2012 at 7:03 AM, Brodie Rao <brodie at sf.io> wrote:

>
>  def has_fifo():
> -    return hasattr(os, "mkfifo")
> +    return getattr(os, "mkfifo", None) is not None
>

Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120512/4d788bcf/attachment.html>


More information about the Mercurial-devel mailing list