This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pwd and grp modules error msg improvements
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: barry
Priority: normal Keywords:

Created on 2004-01-16 22:37 by barry, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pwdgrp.txt barry, 2004-01-16 22:37
Messages (2)
msg19720 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2004-01-16 22:37
pwd.getpwnam(), pwd.getpwuid(), grp.getgrnam(), and
grp.getgrgid() all produce KeyErrors when the integer
or string they're passed can't be found.  That's all
fine and good, except that they don't include the name
or uid in the error message. This can really suck for
debugging.

The attached patch improves the error message by
including the uid and name in the error string.

This should be backported to Python 2.3 as well.
msg19721 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2004-01-20 21:08
Logged In: YES 
user_id=12800

Applied to Python 2.4 and 2.3-maint.
History
Date User Action Args
2022-04-11 14:56:02adminsetgithub: 39832
2004-01-16 22:37:57barrycreate