[Python-checkins] python/dist/src/Modules pwdmodule.c,1.38,1.39

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Tue Jan 20 16:07:25 EST 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv1755
Modified Files:
	pwdmodule.c 
Log Message:
pwd_getpwuid(), pwd_getpwnam(): Patch # 868499, improvement to the error
messages.
Index: pwdmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** pwdmodule.c	23 Oct 2003 23:54:57 -0000	1.38
--- pwdmodule.c	20 Jan 2004 21:07:23 -0000	1.39
***************
*** 108,112 ****
 		return NULL;
 	if ((p = getpwuid(uid)) == NULL) {
! 		PyErr_SetString(PyExc_KeyError, "getpwuid(): uid not found");
 		return NULL;
 	}
--- 108,113 ----
 		return NULL;
 	if ((p = getpwuid(uid)) == NULL) {
! 		PyErr_Format(PyExc_KeyError,
! 			 "getpwuid(): uid not found: %d", uid);
 		return NULL;
 	}
***************
*** 128,132 ****
 		return NULL;
 	if ((p = getpwnam(name)) == NULL) {
! 		PyErr_SetString(PyExc_KeyError, "getpwnam(): name not found");
 		return NULL;
 	}
--- 129,134 ----
 		return NULL;
 	if ((p = getpwnam(name)) == NULL) {
! 		PyErr_Format(PyExc_KeyError,
! 			 "getpwnam(): name not found: %s", name);
 		return NULL;
 	}


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /