diff options
author | Till Maas <opensource@till.name> | 2010-12-25 12:25:06 +0100 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2010-12-25 12:25:06 +0100 |
commit | 10651d76bded0863b55e9c5ea9067c7db9a419f0 (patch) | |
tree | ad63bb3cf738f20ab49897bf2806ff3ff84319bf /cnucnu | |
parent | dde6a3498e460858475c9f87b16a6a4dced29ef8 (diff) | |
download | cnucnu-10651d76bded0863b55e9c5ea9067c7db9a419f0.tar.gz cnucnu-10651d76bded0863b55e9c5ea9067c7db9a419f0.tar.xz cnucnu-10651d76bded0863b55e9c5ea9067c7db9a419f0.zip |
rename summary to short_desc
Using summary as bug field creates an AttributeError on Fedora 14:
File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1206, in __getattr__
raise AttributeError, "field %s not in bugzilla.bugfields" % name
AttributeError: field summary not in bugzilla.bugfields
Diffstat (limited to 'cnucnu')
-rw-r--r-- | cnucnu/bugzilla_reporter.py | 18 | ||||
-rw-r--r-- | cnucnu/checkshell.py | 4 | ||||
-rwxr-xr-x | cnucnu/config.py | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/cnucnu/bugzilla_reporter.py b/cnucnu/bugzilla_reporter.py index 569c5bf..cd5803f 100644 --- a/cnucnu/bugzilla_reporter.py +++ b/cnucnu/bugzilla_reporter.py @@ -74,15 +74,15 @@ class BugzillaReporter(object): new_bug, change_status = self.create_outdated_bug(package, dry_run) else: open_bug = package.open_outdated_bug - summary = open_bug.summary + short_desc = open_bug.short_desc - # summary should be '<name>-<version> <some text>' + # short_desc should be '<name>-<version> <some text>' # To extract the version get everything before the first space # with split and then remove the name and '-' via slicing - bug_version = summary.split(" ")[0][len(package.name)+1:] + bug_version = short_desc.split(" ")[0][len(package.name)+1:] if bug_version != package.latest_upstream: - update = {'short_desc': self.config["summary template"] % package, + update = {'short_desc': self.config["short_desc template"] % package, 'comment': self.config["description template"] % package } print repr(update) @@ -96,7 +96,7 @@ class BugzillaReporter(object): def create_outdated_bug(self, package, dry_run=True): bug_dict = {'component': package.name, - 'summary': self.config["summary template"] % package, + 'short_desc': self.config["short_desc template"] % package, 'description': self.config["description template"] % package } bug_dict.update(self.new_bug) @@ -114,10 +114,10 @@ class BugzillaReporter(object): return (bug_dict, None) def get_exact_outdated_bug(self, package): - summary_pattern = '%(name)s-%(latest_upstream)s ' % 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': [summary_pattern], + 'short_desc': [short_desc_pattern], 'short_desc_type': ['substring'] } @@ -129,9 +129,9 @@ class BugzillaReporter(object): else: return bugs - # The summary_pattern contains a space at the end, which is currently + # The short_desc_pattern contains a space at the end, which is currently # not recognized by bugzilla. Therefore this test is required: - if bug.summary.startswith(summary_pattern): + if bug.short_desc.startswith(short_desc_pattern): return bug else: return None diff --git a/cnucnu/checkshell.py b/cnucnu/checkshell.py index fede8e2..fa9941f 100644 --- a/cnucnu/checkshell.py +++ b/cnucnu/checkshell.py @@ -134,10 +134,10 @@ class CheckShell(cmd.Cmd): print "Not Found in CVS" bug = self.package.exact_outdated_bug if bug: - print "Exact Bug:", "%s %s:%s" % (self.br.bug_url(bug), bug.bug_status, bug.summary) + print "Exact Bug:", "%s %s:%s" % (self.br.bug_url(bug), bug.bug_status, bug.short_desc) bug = self.package.open_outdated_bug if bug: - print "Open Bug:", "%s %s:%s" % (self.br.bug_url(bug), bug.bug_status, bug.summary) + print "Open Bug:", "%s %s:%s" % (self.br.bug_url(bug), bug.bug_status, bug.short_desc) except UpstreamVersionRetrievalError, uvre: print "Cannot retrieve upstream Version:", uvre return stop diff --git a/cnucnu/config.py b/cnucnu/config.py index 4adbbb4..d52939d 100755 --- a/cnucnu/config.py +++ b/cnucnu/config.py @@ -38,7 +38,7 @@ bugzilla: bug status: NEW explanation url: 'https://fedoraproject.org/wiki/Upstream_release_monitoring' - summary template: "%%(name)s-%%(latest_upstream)s is available" + short_desc template: "%%(name)s-%%(latest_upstream)s is available" description template: 'Latest upstream release: %%(latest_upstream)s Current version in %%(repo_name)s: %%(repo_version)s |