X Tutup
Skip to content

Commit 56aed5c

Browse files
author
jackjansen
committed
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. git-svn-id: http://svn.python.org/projects/python/trunk@30273 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 5f51fbc commit 56aed5c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Mac/Modules/file/_Filemodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,7 +2671,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
26712671
}
26722672
return 1;
26732673
}
2674+
#if !TARGET_API_MAC_OSX
26742675
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
2676+
#endif
26752677
return 0;
26762678
}
26772679

Mac/Modules/file/filesupport.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ def declare(self, name):
195195
}
196196
return 1;
197197
}
198+
#if !TARGET_API_MAC_OSX
198199
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
200+
#endif
199201
return 0;
200202
}
201203

0 commit comments

Comments
 (0)
X Tutup