From: Benjamin Peterson Date: Sun, 2 Mar 2014 00:14:12 +0000 (-0500) Subject: fix test_posix.test_initgroups to work without supplemental groups (closes #20249) X-Git-Tag: v2.7.7rc1~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bde1cfb0cdd97d12939fc48f294f814025574a39;p=python fix test_posix.test_initgroups to work without supplemental groups (closes #20249) --- diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index a6d47af319..76a74fb907 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -546,7 +546,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())