From 1b632ee2e4c64148a942db567f4e4ef6de6af571 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Tue, 22 Jul 2008 12:59:27 -0400 Subject: Add support for filing tracebacks directly into bugzilla. This patch adds support for save to bugzilla, using the python-bugzilla module. We get the bugzilla URL from product.bugUrl and require the user to already have a valid account with that bugzilla instance. That should cut down on potential abuse. To cut down on the number of possible duplicates, we hash the file name, function name, and line of each frame in the traceback and store that hash in the bug itself. Before filing a new bug, we query for any bugs containing that hash value. If found, we simply add the traceback as a new attachment and put the user on the CC list. If not found, we create a new bug. Either way, the user is encouraged to visit their bug and make a more meaningful comment. --- gui.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui.py') diff --git a/gui.py b/gui.py index 2a8572213..2629576f2 100755 --- a/gui.py +++ b/gui.py @@ -732,6 +732,7 @@ class SaveExceptionWindow: self.usernameEntry = exnxml.get_widget("usernameEntry") self.passwordEntry = exnxml.get_widget("passwordEntry") + self.bugDesc = exnxml.get_widget("bugDesc") self.diskButton = exnxml.get_widget("diskButton") self.diskCombo = exnxml.get_widget("diskCombo") @@ -745,6 +746,8 @@ class SaveExceptionWindow: self.remoteButton.connect("toggled", self.radio_changed) self.localButton.connect("toggled", self.radio_changed) + self.remoteButton.set_label(self.remoteButton.get_label() % product.bugUrl) + cell = gtk.CellRendererText() self.diskCombo.pack_start(cell, True) self.diskCombo.set_attributes(cell, text=1) @@ -795,7 +798,8 @@ class SaveExceptionWindow: elif self.saveToLocal(): return self.localChooser.get_filename() else: - return map(lambda e: e.get_text(), [self.usernameEntry, self.passwordEntry]) + return map(lambda e: e.get_text(), [self.usernameEntry, self.passwordEntry, + self.bugDesc]) def pop(self): self.window.destroy() -- cgit