Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
30da0ea1
Commit
30da0ea1
authored
Dec 15, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Believe it or not, some people have an empty group database.
Prevent the test from failing there.
parent
095f35ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
Lib/test/test_grp.py
Lib/test/test_grp.py
+10
-7
No files found.
Lib/test/test_grp.py
View file @
30da0ea1
...
@@ -12,11 +12,14 @@ if verbose:
...
@@ -12,11 +12,14 @@ if verbose:
for
group
in
groups
:
for
group
in
groups
:
print
group
print
group
if
not
groups
:
group
=
grp
.
getgrgid
(
groups
[
0
][
2
])
if
verbose
:
if
verbose
:
print
"Empty Group Database -- no further tests of grp module possible"
else
:
group
=
grp
.
getgrgid
(
groups
[
0
][
2
])
if
verbose
:
print
'Group Entry for GID %d: %s'
%
(
groups
[
0
][
2
],
group
)
print
'Group Entry for GID %d: %s'
%
(
groups
[
0
][
2
],
group
)
group
=
grp
.
getgrnam
(
groups
[
0
][
0
])
group
=
grp
.
getgrnam
(
groups
[
0
][
0
])
if
verbose
:
if
verbose
:
print
'Group Entry for group %s: %s'
%
(
groups
[
0
][
0
],
group
)
print
'Group Entry for group %s: %s'
%
(
groups
[
0
][
0
],
group
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment