From fc511be6b2388f8f63c59edd96d4670d967891de Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 6 Apr 2010 09:04:04 +0200 Subject: [PATCH] An OSError is more appropriate I think. --- modules/trash_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/trash_osx.c b/modules/trash_osx.c index ea3ebe9..f14b702 100644 --- a/modules/trash_osx.c +++ b/modules/trash_osx.c @@ -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;