From: Michael Tremer Date: Sat, 27 Feb 2021 11:56:48 +0000 (+0000) Subject: _pakfire: Show path when mount/umount failed X-Git-Tag: 0.9.28~1285^2~682 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=098937ca73c3c5f724f20c92835eb740ce78fcbb;p=pakfire.git _pakfire: Show path when mount/umount failed Signed-off-by: Michael Tremer --- diff --git a/src/_pakfire/_pakfiremodule.c b/src/_pakfire/_pakfiremodule.c index 7357c52ed..991b56801 100644 --- a/src/_pakfire/_pakfiremodule.c +++ b/src/_pakfire/_pakfiremodule.c @@ -90,7 +90,7 @@ static PyObject* _pakfire_mount(PyObject* self, PyObject* args, PyObject* kwds) int r = mount(path, target, type, flags, options); if (r) { - PyErr_SetFromErrno(PyExc_OSError); + PyErr_SetFromErrnoWithFilename(PyExc_OSError, path); return NULL; } @@ -105,7 +105,7 @@ static PyObject* _pakfire_umount(PyObject* self, PyObject* args) { int r = umount(path); if (r) { - PyErr_SetFromErrno(PyExc_OSError); + PyErr_SetFromErrnoWithFilename(PyExc_OSError, path); return NULL; }