]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
_pakfire: Show path when mount/umount failed
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Feb 2021 11:56:48 +0000 (11:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Feb 2021 11:56:48 +0000 (11:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/_pakfiremodule.c

index 7357c52ed7466730d5a7ceb15ff88c60ed89177e..991b56801acbab6000ef715c5c44858b0f6062ee 100644 (file)
@@ -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;
        }