From 659a6f562b0a6ed375b4708603a75150ed520694 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 1 Mar 2014 19:14:12 -0500 Subject: [PATCH] fix test_posix.test_initgroups to work without supplemental groups (closes #20249) --- Lib/test/test_posix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 9408e5c1b58..5c09ebfe8e4 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1144,7 +1144,7 @@ class PosixGroupsTester(unittest.TestCase): def test_initgroups(self): # find missing group - g = max(self.saved_groups) + 1 + g = max(self.saved_groups or [0]) + 1 name = pwd.getpwuid(posix.getuid()).pw_name posix.initgroups(name, g) self.assertIn(g, posix.getgroups())