summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-09 09:35:42 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-09 09:35:42 +0300
commitcbad134dd453a24d3e0e55ad81dff0e0baa2f7e9 (patch)
tree81e12c2e6adedb90f4979e56666dd3e89ac1653f /python
parent121ea41e33d19e415302c66e842a228212d80c22 (diff)
downloadrpm-cbad134dd453a24d3e0e55ad81dff0e0baa2f7e9.tar.gz
rpm-cbad134dd453a24d3e0e55ad81dff0e0baa2f7e9.tar.bz2
rpm-cbad134dd453a24d3e0e55ad81dff0e0baa2f7e9.zip
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
Diffstat (limited to 'python')
-rw-r--r--python/rpmbmodule.c7
-rw-r--r--python/spec-py.c2
-rw-r--r--python/spec-py.h2
3 files changed, 1 insertions, 10 deletions
diff --git a/python/rpmbmodule.c b/python/rpmbmodule.c
index 2c18ed35a..2332590f2 100644
--- a/python/rpmbmodule.c
+++ b/python/rpmbmodule.c
@@ -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);
diff --git a/python/spec-py.c b/python/spec-py.c
index f9964f749..6b89d9738 100644
--- a/python/spec-py.c
+++ b/python/spec-py.c
@@ -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);
diff --git a/python/spec-py.h b/python/spec-py.h
index b5220294c..30c5cd977 100644
--- a/python/spec-py.h
+++ b/python/spec-py.h
@@ -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);