diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-05-23 17:25:21 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-05-23 17:25:21 +0200 |
commit | 497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0 (patch) | |
tree | 87743b78ac8c78dc23604115e787ae0f02aeb3f1 /src/report-python | |
parent | 28e6bba1e2a35f6bca8f27b5397e1c7fa2171fd4 (diff) | |
download | abrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.tar.gz abrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.tar.xz abrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.zip |
obsolete report with libreport-python
Diffstat (limited to 'src/report-python')
-rw-r--r-- | src/report-python/__init__.py | 11 | ||||
-rw-r--r-- | src/report-python/common.h | 1 | ||||
-rw-r--r-- | src/report-python/reportmodule.c | 10 |
3 files changed, 19 insertions, 3 deletions
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py index 3e55ea38..2e875638 100644 --- a/src/report-python/__init__.py +++ b/src/report-python/__init__.py @@ -111,15 +111,20 @@ def createAlertSignature(component, hashmarkername, hashvalue, summary, alertSig cd = problem_data() cd.add("component", component) cd.add("hashmarkername", hashmarkername) - cd.add("localhash", hashvalue) - cd.add("summary", summary) + #cd.add("localhash", hashvalue) + cd.add("global_uuid", hashvalue) + cd.add("reason", summary) cd.add("description", alertSignature) cd.add("product", getProduct()) cd.add("version", getVersion()) return cd - +""" def report(cd, io_unused): state = run_event_state() #state.logging_callback = logfunc r = state.run_event_on_problem_data(cd, "report") return r +""" + +def report(pd, io_unused): + result = report_problem_data(pd) diff --git a/src/report-python/common.h b/src/report-python/common.h index c94e8d90..ee56ad9a 100644 --- a/src/report-python/common.h +++ b/src/report-python/common.h @@ -21,6 +21,7 @@ #include "dump_dir.h" #include "problem_data.h" #include "run_event.h" +#include "report.h" /* exception object */ extern PyObject *ReportError; diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c index 92f435ce..1cae783f 100644 --- a/src/report-python/reportmodule.c +++ b/src/report-python/reportmodule.c @@ -22,11 +22,21 @@ PyObject *ReportError; + +static PyObject *p_report(PyObject *pself, PyObject *problem_data) +{ + p_problem_data *p_pd = (p_problem_data*)problem_data; + report(p_pd->cd); + //FIXME return status as integer object + Py_RETURN_NONE; +} + static PyMethodDef module_methods[] = { /* method_name, func, flags, doc_string */ { "dd_opendir" , p_dd_opendir , METH_VARARGS }, { "dd_create" , p_dd_create , METH_VARARGS }, { "delete_dump_dir", p_delete_dump_dir, METH_VARARGS }, + { "report_problem_data" , p_report, METH_O}, { NULL } }; |