Kill off _rpmb.error exception type
- import of _rpmb messes up rpm.error to point to _rpmb.error which we do not want - use ValueError for unparsable spec for now, need to figure something saner there still
This commit is contained in:
parent
121ea41e33
commit
cbad134dd4
|
@ -4,9 +4,6 @@
|
|||
|
||||
#include "debug.h"
|
||||
|
||||
/* hmm.. figure something better */
|
||||
PyObject * pyrpmbError;
|
||||
|
||||
static char rpmb__doc__[] =
|
||||
"";
|
||||
|
||||
|
@ -24,10 +21,6 @@ void init_rpmb(void)
|
|||
|
||||
d = PyModule_GetDict(m);
|
||||
|
||||
pyrpmbError = PyErr_NewException("_rpmb.error", NULL, NULL);
|
||||
if (pyrpmbError != NULL)
|
||||
PyDict_SetItemString(d, "error", pyrpmbError);
|
||||
|
||||
Py_INCREF(&spec_Type);
|
||||
PyModule_AddObject(m, "spec", (PyObject *) &spec_Type);
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ static PyObject *spec_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
|
|||
cookie, anyarch, force) == 0) {
|
||||
spec = rpmtsSpec(ts);
|
||||
} else {
|
||||
PyErr_SetString(pyrpmbError, "can't parse specfile\n");
|
||||
PyErr_SetString(PyExc_ValueError, "can't parse specfile\n");
|
||||
}
|
||||
rpmtsFree(ts);
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ typedef struct specObject_s specObject;
|
|||
|
||||
extern PyTypeObject spec_Type;
|
||||
|
||||
extern PyObject *pyrpmbError;
|
||||
|
||||
#define specObject_Check(v) ((v)->ob_type == &spec_Type)
|
||||
|
||||
rpmSpec specFromSpec(specObject * spec);
|
||||
|
|
Loading…
Reference in New Issue