Ejemplo n.º 1
0
    def create(self, problem_dict):
        probd = report.problem_data()
        for key, value in problem_dict.iteritems():
            probd.add(key, value)

        ddir = probd.create_dump_dir(self.directory)
        ret = ddir.name
        ddir.close()
        return ret
Ejemplo n.º 2
0
    def create(self, problem_dict):
        probd = report.problem_data()
        for key, value in problem_dict.items():
            probd.add(key, value)

        ddir = probd.create_dump_dir(self.directory)
        ret = ddir.name
        ddir.close()
        problem.notify_new_path(ret)
        return ret
Ejemplo n.º 3
0
def _on_button_send_cb(button, dialog):
    buf = dialog.tev.get_buffer()
    it_start = buf.get_start_iter()
    it_end = buf.get_end_iter()
    description = buf.get_text(it_start, it_end, False)

    if len(description) < 10:
        _show_error_dialog(dialog,
                _("The description of problem is too short"),
                _("In order to get more useful reports we "
                    "do not accept reports with the description "
                    "shorter than 10 letters."))

        dialog.tev.grab_focus()
        return

    summary = dialog.txe_reason.get_text()
    if len(summary) < 10:
        _show_error_dialog(dialog,
                _("The summary of problem is too short"),
                _("In order to get more useful reports we "
                    "do not accept reports with the summary "
                    "shorter than 10 letters."))

        dialog.txe_reason.grab_focus()
        dialog.txe_reason.set_position(len(summary))
        return

    dialog.destroy()

    report = problem_data()
    report.add("reason", summary)
    report.add("comment", description)
    report.add("component", gnome_abrt.PACKAGE)
    report.add("package",
            "{0}-{1}".format(gnome_abrt.PACKAGE, gnome_abrt.VERSION))

    report.add_basics()
    report.add("duphash", report.get("uuid")[0])


    report_problem_in_memory(report, LIBREPORT_NOWAIT)
Ejemplo n.º 4
0
def _on_button_send_cb(button, dialog):
    buf = dialog.tev.get_buffer()
    it_start = buf.get_start_iter()
    it_end = buf.get_end_iter()
    description = buf.get_text(it_start, it_end, False)

    if len(description) < 10:
        _show_error_dialog(
            dialog, _("The description of problem is too short"),
            _("In order to get more useful reports we "
              "do not accept reports with the description "
              "shorter than 10 letters."))

        dialog.tev.grab_focus()
        return

    summary = dialog.txe_reason.get_text()
    if len(summary) < 10:
        _show_error_dialog(
            dialog, _("The summary of problem is too short"),
            _("In order to get more useful reports we "
              "do not accept reports with the summary "
              "shorter than 10 letters."))

        dialog.txe_reason.grab_focus()
        dialog.txe_reason.set_position(len(summary))
        return

    dialog.destroy()

    report = problem_data()
    report.add("reason", summary)
    report.add("comment", description)
    report.add("component", gnome_abrt.PACKAGE)
    report.add("package", "{0}-{1}".format(gnome_abrt.PACKAGE,
                                           gnome_abrt.VERSION))

    report.add_basics()
    report.add("duphash", report.get("uuid")[0])

    report_problem_in_memory(report, LIBREPORT_NOWAIT)