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
c7a77093
Commit
c7a77093
authored
Jan 20, 2004
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grp_getgrgid(), grp_getgrnam(): Patch # 868499, improvement to the error
messages.
parent
734fb572
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Modules/grpmodule.c
Modules/grpmodule.c
+2
-2
No files found.
Modules/grpmodule.c
View file @
c7a77093
...
...
@@ -90,7 +90,7 @@ grp_getgrgid(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"i:getgrgid"
,
&
gid
))
return
NULL
;
if
((
p
=
getgrgid
(
gid
))
==
NULL
)
{
PyErr_SetString
(
PyExc_KeyError
,
"getgrgid(): gid not found"
);
PyErr_Format
(
PyExc_KeyError
,
"getgrgid(): gid not found: %d"
,
gid
);
return
NULL
;
}
return
mkgrent
(
p
);
...
...
@@ -104,7 +104,7 @@ grp_getgrnam(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"s:getgrnam"
,
&
name
))
return
NULL
;
if
((
p
=
getgrnam
(
name
))
==
NULL
)
{
PyErr_SetString
(
PyExc_KeyError
,
"getgrnam(): name not found"
);
PyErr_Format
(
PyExc_KeyError
,
"getgrnam(): name not found: %s"
,
name
);
return
NULL
;
}
return
mkgrent
(
p
);
...
...
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