mirror of
https://github.com/arsenetar/send2trash.git
synced 2024-12-21 10:59:03 +00:00
An OSError is more appropriate I think.
This commit is contained in:
parent
5aa4811725
commit
fc511be6b2
@ -15,7 +15,7 @@ static PyObject* trash_osx_send(PyObject *self, PyObject *args)
|
||||
FSPathMakeRefWithOptions(utf8_chars, kFSPathMakeRefDoNotFollowLeafSymlink, &fp, NULL);
|
||||
op_result = FSMoveObjectToTrashSync(&fp, NULL, kFSFileOperationDefaultOptions);
|
||||
if (op_result != noErr) {
|
||||
PyErr_SetString(PyExc_IOError, GetMacOSStatusCommentString(op_result));
|
||||
PyErr_SetString(PyExc_OSError, GetMacOSStatusCommentString(op_result));
|
||||
return NULL;
|
||||
}
|
||||
return Py_None;
|
||||
|
Loading…
Reference in New Issue
Block a user