# HG changeset patch # User Matt Harbison # Date 2021-12-13 05:18:31 # Node ID f21e7748c257d688fe841968bc910cd30e768d24 # Parent cb477edeca799f54b1f9a5ac39437202ce331755 hghave: fix the check for suid on platforms lacking support The mac tests were raising an AttributeError without the default arg. Differential Revision: https://phab.mercurial-scm.org/D11906 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -266,7 +266,10 @@ def has_executablebit(): @check("suidbit", "setuid and setgid bit") def has_suidbit(): - if getattr(os, "statvfs", None) is None or getattr(os, "ST_NOSUID") is None: + if ( + getattr(os, "statvfs", None) is None + or getattr(os, "ST_NOSUID", None) is None + ): return False return bool(os.statvfs('.').f_flag & os.ST_NOSUID)