# HG changeset patch # User Brodie Rao # Date 1336831253 -7200 # Node ID f0ce3dcd5c872eb8c309869d39dda64945cad341 # Parent 838e4146e7630ac33316e64dc35b88098eab62aa cleanup: replace hasattr() usage with getattr() in hghave [ original upstream message ] diff -r 838e4146e763 -r f0ce3dcd5c87 tests/hghave --- a/tests/hghave Sat May 12 15:56:23 2012 +0200 +++ b/tests/hghave Sat May 12 16:00:53 2012 +0200 @@ -106,7 +106,7 @@ 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 @@ 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: