aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/cvetools.py')
-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)