[Python-checkins] python/dist/src/Mac/Modules/file _Filemodule.c,1.9,1.10 filesupport.py,1.7,1.8

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 25 Dec 2002 14:45:30 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/file
In directory sc8-pr-cvs1:/tmp/cvs-serv854

Modified Files:
	_Filemodule.c filesupport.py 
Log Message:
If you entered a pathname for a nonexisting file to a FSSpec constructor
on OSX then the actual error (file not found) was obscured by the
error message that tried to be helpful about the allowed arguments. Fixed.


Index: _Filemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/_Filemodule.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** _Filemodule.c	23 Dec 2002 23:16:22 -0000	1.9
--- _Filemodule.c	25 Dec 2002 22:45:28 -0000	1.10
***************
*** 2672,2676 ****
--- 2672,2678 ----
  		return 1;
  	}
+ #if !TARGET_API_MAC_OSX
  	PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
+ #endif
  	return 0;
  }

Index: filesupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/filesupport.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** filesupport.py	19 Dec 2002 23:26:58 -0000	1.7
--- filesupport.py	25 Dec 2002 22:45:28 -0000	1.8
***************
*** 196,200 ****
--- 196,202 ----
  		return 1;
  	}
+ #if !TARGET_API_MAC_OSX
  	PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
+ #endif
  	return 0;
  }