summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grp.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:53:40 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:53:40 (GMT)
commit0e664e15efb87b437402a7e6524d635033b7a91e (patch)
treeaf685bf902654391e9f7a218caa29396a43b70e2 /Lib/test/test_grp.py
parent80768f86359ddd9006301baefae9398364c55eb2 (diff)
downloadcpython-0e664e15efb87b437402a7e6524d635033b7a91e.zip
cpython-0e664e15efb87b437402a7e6524d635033b7a91e.tar.gz
cpython-0e664e15efb87b437402a7e6524d635033b7a91e.tar.bz2
skip NIS entries, empty entries, etc
Diffstat (limited to 'Lib/test/test_grp.py')
-rwxr-xr-xLib/test/test_grp.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py
index f7d2191..2c3ab29 100755
--- a/Lib/test/test_grp.py
+++ b/Lib/test/test_grp.py
@@ -42,6 +42,8 @@ class GroupDatabaseTestCase(unittest.TestCase):
bynames = {}
bygids = {}
for (n, p, g, mem) in grp.getgrall():
+ if not n or n == '+':
+ continue # skip NIS entries etc.
bynames[n] = g
bygids[g] = n