aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2009-04-22 11:39:38 +0000
committerRobert Buchholz <rbu@gentoo.org>2009-04-22 11:39:38 +0000
commita41be63921fb498aafcbaae6fc7df64c6d134512 (patch)
tree1d6897d8b63082dec85183333b57e8796c486eb1
parentSome bug updates (diff)
downloadsecurity-a41be63921fb498aafcbaae6fc7df64c6d134512.tar.gz
security-a41be63921fb498aafcbaae6fc7df64c6d134512.tar.bz2
security-a41be63921fb498aafcbaae6fc7df64c6d134512.zip
Adapt bugzilla config for pybugz 0.7.4_rc3.
svn path=/; revision=1295
-rw-r--r--lib/python/cvetools.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/python/cvetools.py b/lib/python/cvetools.py
index 46868c2..e2d29a6 100644
--- a/lib/python/cvetools.py
+++ b/lib/python/cvetools.py
@@ -192,13 +192,7 @@ class BugReporter:
CVEGROUPALL = re.compile(r'[ (]*CVE-(\d{4})([-,(){}|, \d]+)')
CVEGROUPSPLIT = re.compile(r'(?<=\D)(\d{4})(?=\D|$)')
def __init__(self, username = None, password = None):
- try:
- import bugz
- except:
- return
-
- # edit bugz config defaults for us
- bugz.config.params['post'] = {
+ postconfig = {
'product': 'Gentoo Security',
'version': 'unspecified',
'rep_platform': 'All',
@@ -216,7 +210,20 @@ class BugReporter:
'short_desc': '',
'comment': '',
}
- self.bugz_auth = bugz.Bugz(base = "https://bugs.gentoo.org",
+
+ try:
+ import bugz.bugzilla
+ bugz.bugzilla.config.params['post'] = postconfig
+ Bugz = bugz.bugzilla.Bugz
+ except:
+ try:
+ import bugz
+ except:
+ return
+ bugz.config.params['post'] = postconfig
+ Bugz = bugz.Bugz
+
+ self.bugz_auth = Bugz(base = "https://bugs.gentoo.org",
user = username,
password = password,
forget = False)