From: Michael Tremer Date: Wed, 1 Nov 2017 20:56:38 +0000 (+0100) Subject: Log reason why file could not be opened X-Git-Tag: 0.9.28~1285^2~1331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e33d2ce8e8f8cc765993683bd4c014ca1c22d28;p=pakfire.git Log reason why file could not be opened Signed-off-by: Michael Tremer --- diff --git a/src/_pakfire/repo.c b/src/_pakfire/repo.c index ee2e0c335..c9107744f 100644 --- a/src/_pakfire/repo.c +++ b/src/_pakfire/repo.c @@ -263,9 +263,8 @@ static PyObject* Repo_cache_open(RepoObject* self, PyObject* args) { Py_RETURN_NONE; FILE* fp = pakfire_repocache_open(cache, filename, mode); - if (!fp) { - PyErr_Format(PyExc_IOError, "Could not open file %s", filename); + PyErr_Format(PyExc_IOError, "Could not open file %s: %s", filename, strerror(errno)); return NULL; }