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: v3.3.5rc2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=659a6f562b0a6ed375b4708603a75150ed520694;p=thirdparty%2FPython%2Fcpython.git 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 9408e5c1b585..5c09ebfe8e44 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())