changeset 48341:f21e7748c257 stable

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
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 13 Dec 2021 00:18:31 -0500
parents cb477edeca79
children 50330d481640 9dd151a39950
files tests/hghave.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Sun Dec 12 19:36:11 2021 -0500
+++ b/tests/hghave.py	Mon Dec 13 00:18:31 2021 -0500
@@ -266,7 +266,10 @@
 
 @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)