Mercurial > hg > mercurial-source
diff tests/hghave @ 16685:43d55088415a
cleanup: replace hasattr() usage with getattr() in hghave
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sat, 12 May 2012 16:00:53 +0200 |
parents | e617876fe82d |
children | cfb6682961b8 |
line wrap: on
line diff
--- a/tests/hghave +++ b/tests/hghave @@ -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: