Kaydet (Commit) 00df3e05 authored tarafından Jack Jansen's avatar Jack Jansen

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.
üst cfe28362
...@@ -2671,7 +2671,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec) ...@@ -2671,7 +2671,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
} }
return 1; return 1;
} }
#if !TARGET_API_MAC_OSX
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required"); PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
#endif
return 0; return 0;
} }
......
...@@ -195,7 +195,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec) ...@@ -195,7 +195,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
} }
return 1; return 1;
} }
#if !TARGET_API_MAC_OSX
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required"); PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
#endif
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment