mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
cfe28362fb
commit
00df3e052b
2 changed files with 4 additions and 0 deletions
|
@ -2671,7 +2671,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
#if !TARGET_API_MAC_OSX
|
||||
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
#if !TARGET_API_MAC_OSX
|
||||
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue