summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2013-10-07 18:55:34 +0200
committerTill Maas <opensource@till.name>2013-10-07 18:55:34 +0200
commitb39ed42f677d9794471defeb30f446e4ffc1799a (patch)
tree4e6898a9f54a21fbcf15ad84f36850b181a3a885
parent1fddb991fb48b7944cc3f13f61414a9582e53a64 (diff)
downloadcnucnu-b39ed42f677d9794471defeb30f446e4ffc1799a.tar.gz
cnucnu-b39ed42f677d9794471defeb30f446e4ffc1799a.tar.xz
cnucnu-b39ed42f677d9794471defeb30f446e4ffc1799a.zip
Adjust Bugzilla query to new release
-rw-r--r--cnucnu/bugzilla_reporter.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/cnucnu/bugzilla_reporter.py b/cnucnu/bugzilla_reporter.py
index 9b42d37..0ba055a 100644
--- a/cnucnu/bugzilla_reporter.py
+++ b/cnucnu/bugzilla_reporter.py
@@ -24,10 +24,13 @@ from helper import filter_dict
import logging
log = logging.getLogger('cnucnu.bugzilla_reporter')
+
class BugzillaReporter(object):
- base_query = {'query_format': ['advanced'], 'emailreporter1': ['1'], 'emailtype1': ['exact']}
+ base_query = {'query_format': 'advanced',
+ 'emailreporter1': '1', 'emailtype1': 'exact'}
- bug_status_open = ['NEW', 'ASSIGNED', 'MODIFIED', 'ON_DEV', 'ON_QA', 'VERIFIED', 'FAILS_QA', 'RELEASE_PENDING', 'POST']
+ bug_status_open = ['NEW', 'ASSIGNED', 'MODIFIED', 'ON_DEV', 'ON_QA',
+ 'VERIFIED', 'FAILS_QA', 'RELEASE_PENDING', 'POST']
bug_status_closed = ['CLOSED']
new_bug = {}
@@ -125,20 +128,20 @@ class BugzillaReporter(object):
def get_exact_outdated_bug(self, package):
short_desc_pattern = '%(name)s-%(latest_upstream)s ' % package
- q = {'component': [package.name],
- 'bug_status': self.bug_status_open + self.bug_status_closed,
- 'short_desc': [short_desc_pattern],
- 'short_desc_type': ['substring']
- }
-
- q.update(self.base_query)
- logging.debug("get_exact_outdated_bug: Bugzilla query: %s", q)
- bugs = self.bz.query(q)
+ query = {'component': package.name,
+ 'bug_status': self.bug_status_open + self.bug_status_closed,
+ 'short_desc': short_desc_pattern,
+ 'short_desc_type': 'substring'}
+
+ query.update(self.base_query)
+ logging.debug("get_exact_outdated_bug: Bugzilla query: %s", query)
+ bugs = self.bz.query(query)
if bugs:
# TODO if more than one bug, manual intervention might be required
for bug in bugs:
- # The short_desc_pattern contains a space at the end, which is currently
- # not recognized by bugzilla. Therefore this test is required:
+ # The short_desc_pattern contains a space at the end, which is
+ # currently not recognized by bugzilla. Therefore this test is
+ # required:
if bug.short_desc.startswith(short_desc_pattern):
return bug