[Python-checkins] python/dist/src/Modules posixmodule.c,2.261,2.262

mhammond@users.sourceforge.net mhammond@users.sourceforge.net
Thu, 03 Oct 2002 00:24:51 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12496

Modified Files:
	posixmodule.c 
Log Message:
Trivial fix to the pep277 checkin: ensure that exceptions always have a filename attribute (previously did only when string filenames were passed, but not when unicode)

Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.261
retrieving revision 2.262
diff -C2 -d -r2.261 -r2.262
*** posixmodule.c	3 Oct 2002 05:10:38 -0000	2.261
--- posixmodule.c	3 Oct 2002 07:24:48 -0000	2.262
***************
*** 561,565 ****
  			Py_END_ALLOW_THREADS
  			if (res < 0)
! 				return posix_error();
  			Py_INCREF(Py_None);
  			return Py_None;
--- 561,565 ----
  			Py_END_ALLOW_THREADS
  			if (res < 0)
! 				return posix_error_with_unicode_filename(PyUnicode_AS_UNICODE(po));
  			Py_INCREF(Py_None);
  			return Py_None;