Type mismatch is TypeError, not rpm.error
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 5 Oct 2009 12:22:12 +0000 (15:22 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 5 Oct 2009 12:22:12 +0000 (15:22 +0300)
python/rpmmodule.c

index 980aee0..65de3b0 100644 (file)
@@ -64,7 +64,7 @@ static PyObject * setLogFile (PyObject * self, PyObject * args, PyObject *kwds)
 
     if (fop) {
        if (!PyFile_Check(fop)) {
-           PyErr_SetString(pyrpmError, "requires file object");
+           PyErr_SetString(PyExc_TypeError, "requires file object");
            return NULL;
        }
        fp = PyFile_AsFile(fop);