From 881a2e000d03db9e9b24c7d416b5f73984fd07c7 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 4 Jan 2004 13:49:51 +0000 Subject: [PATCH] Stylistic updates. --- plugins/Bugzilla.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/plugins/Bugzilla.py b/plugins/Bugzilla.py index 71fe28ee4..9da944f1a 100644 --- a/plugins/Bugzilla.py +++ b/plugins/Bugzilla.py @@ -56,16 +56,19 @@ import callbacks import structures import configurable -statusKeys = ['unconfirmed', 'new', 'assigned', 'reopened', 'resolved', \ - 'verified', 'closed'] -resolutionKeys = ['fixed', 'invalid', 'worksforme', 'needinfo', \ - 'test-request', 'wontfix', 'cantfix', 'moved', 'duplicate', 'remind', 'later'] -resolutionKeys += ['notabug', 'notgnome', 'incomplete', 'gnome1.x', 'moved' ] -priorityKeys = ['p1', 'p2', 'p3', 'p4', 'p5'] -priorityKeys += ['Low', 'Normal', 'High', 'Immediate', 'Urgent'] -severityKeys = ['enhancement', 'trivial', 'minor', 'normal', 'major', \ - 'critical', 'blocker'] +statusKeys = ['unconfirmed', 'new', 'assigned', 'reopened', 'resolved', + 'verified', 'closed'] +resolutionKeys = ['fixed', 'invalid', 'worksforme', 'needinfo', + 'test-request', 'wontfix', 'cantfix', 'moved', 'duplicate', + 'remind', 'later', 'notabug', 'notgnome', 'incomplete', + 'gnome1.x', 'moved'] +priorityKeys = ['p1', 'p2', 'p3', 'p4', 'p5', 'Low', 'Normal', 'High', + 'Immediate', 'Urgent'] +severityKeys = ['enhancement', 'trivial', 'minor', 'normal', 'major', + 'critical', 'blocker'] + dbfilename = os.path.join(conf.dataDir, 'Bugzilla.db') + def makeDb(filename): if os.path.exists(filename): d = structures.PersistentDictionary(filename) @@ -79,10 +82,12 @@ def makeDb(filename): d.flush() return d + class BugzillaError(Exception): """A bugzilla error""" pass + def configure(onStart, afterConnect, advanced): from questions import expect, anything, yn onStart.append('load Bugzilla') @@ -95,6 +100,7 @@ def configure(onStart, afterConnect, advanced): replyNoBugzilla = 'I don\'t have a bugzilla %r' + class Bugzilla(callbacks.PrivmsgCommandAndRegexp, configurable.Mixin): """Show a link to a bug report with a brief description""" threaded = True @@ -130,9 +136,8 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp, configurable.Mixin): query.append('ctype=csv') return query def die(self): - configurable.Mixin.die(self) self.db.close() - del self.db + configurable.Mixin.die(self) def add(self, irc, msg, args): """