diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-03-04 14:33:35 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-03-04 14:43:54 +0200 |
commit | d69ebf18f100193305c5a49c7ac5c26978db67d2 (patch) | |
tree | c52ebe115c775979ecbb276143530596fe6a9c3f | |
parent | a1da07e60d9a43fa7832eab0f4842fff465254e5 (diff) | |
download | rpm-d69ebf18f100193305c5a49c7ac5c26978db67d2.tar.gz rpm-d69ebf18f100193305c5a49c7ac5c26978db67d2.tar.bz2 rpm-d69ebf18f100193305c5a49c7ac5c26978db67d2.zip |
Throw an exception from Fseek() errors in python rpmfd.seek()
-rw-r--r-- | python/rpmfd-py.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c index 877ed5868..d6103ca9b 100644 --- a/python/rpmfd-py.c +++ b/python/rpmfd-py.c @@ -195,7 +195,7 @@ static PyObject *rpmfd_seek(rpmfdObject *s, PyObject *args, PyObject *kwds) Py_BEGIN_ALLOW_THREADS rc = Fseek(s->fd, offset, whence); Py_END_ALLOW_THREADS - if (Ferror(s->fd)) { + if (rc < 0 || Ferror(s->fd)) { PyErr_SetString(PyExc_IOError, Fstrerror(s->fd)); return NULL; } |