summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2010-12-25 12:25:06 +0100
committerTill Maas <opensource@till.name>2010-12-25 12:25:06 +0100
commit10651d76bded0863b55e9c5ea9067c7db9a419f0 (patch)
treead63bb3cf738f20ab49897bf2806ff3ff84319bf
parentdde6a3498e460858475c9f87b16a6a4dced29ef8 (diff)
downloadcnucnu-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
-rwxr-xr-xbugzilla_set_status.py2
-rw-r--r--cnucnu/bugzilla_reporter.py18
-rw-r--r--cnucnu/checkshell.py4
-rwxr-xr-xcnucnu/config.py2
4 files changed, 13 insertions, 13 deletions
diff --git a/bugzilla_set_status.py b/bugzilla_set_status.py
index b72c3e2..3ee3328 100755
--- a/bugzilla_set_status.py
+++ b/bugzilla_set_status.py
@@ -63,7 +63,7 @@ bz.login(user=username, password=getpass.getpass())
#bug_id_list = [b.bug_id for b in bugs]
#bz._update_bugs(bug_id_list, update)
-def set_summary(bug_id, short_desc):
+def set_short_desc(bug_id, short_desc):
update = {'short_desc': short_desc}
res = bz._update_bugs(bug_id, update)
print res
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