# HG changeset patch # User Brodie Rao # Date 2012-05-12 14:00:53 # Node ID 43d55088415a5424bcbf03511026199d535dacc9 # Parent e617876fe82d83ca18933fb3dd7cd7c0b60d92c0 cleanup: replace hasattr() usage with getattr() in hghave diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -106,7 +106,7 @@ def has_inotify(): return False def has_fifo(): - return hasattr(os, "mkfifo") + return getattr(os, "mkfifo", None) is not None def has_cacheable_fs(): from mercurial import util @@ -169,7 +169,7 @@ def has_p4(): matchoutput('p4d -V', r'Rev\. P4D/')) def has_symlink(): - if not hasattr(os, "symlink"): + if getattr(os, "symlink", None) is None: return False name = tempfile.mktemp(dir=".", prefix='hg-checklink-') try: