From 833b9bdeee9c89256e036e8ca7e7cbc1c1f548d8 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 12:03:30 +0200 Subject: [PATCH] - fixed bug, where description and summary were not updated with the current source package. --- debian/changelog | 2 ++ massfile | 39 ++++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index e93f445..8c69d58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ ubuntu-dev-tools (0.14) UNRELEASED; urgency=low * massfile: - fixed bug where to find example files, - made url get checked beforehand. + - fixed bug, where description and summary were not updated with the + current source package. * examples/massfile.instructions: added example buglist-url. -- Daniel Holbach Thu, 27 Sep 2007 11:43:55 +0200 diff --git a/massfile b/massfile index ad3946f..2c814a5 100755 --- a/massfile +++ b/massfile @@ -67,22 +67,26 @@ def file_bug(config): Bug = Connector.ConnectBug() Bug.authentication = os.path.expanduser("~/.lpcookie") -# try: - bug = Bug.New(product={"name": config["sourcepackage"], "target": "ubuntu"}, - summary=config["subject"], - description=config["text"]) - print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ - (bug.bugnumber, bug.bugnumber) - for sub in config["subscribers"].split(","): - if sub.strip("\n").strip(): - bug.subscribers.add(sub.strip("\n").strip()) - for tag in config["tags"].split(","): - if tag.strip("\n").strip(): - bug.tags.append(tag.strip("\n").strip()) - bug.assignee = config["assignee"] - bug.commit() -# except: -# "Bug for '%s' was not filed." % config["sourcepackage"] + try: + summary = config["subject"].replace("$pack", pack) + description = config["text"].replace("$pack", pack) + + bug = Bug.New(product={"name": config["sourcepackage"], + "target": "ubuntu"}, + summary=summary, + description=description) + print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ + (bug.bugnumber, bug.bugnumber) + for sub in config["subscribers"].split(","): + if sub.strip("\n").strip(): + bug.subscribers.add(sub.strip("\n").strip()) + for tag in config["tags"].split(","): + if tag.strip("\n").strip(): + bug.tags.append(tag.strip("\n").strip()) + bug.assignee = config["assignee"] + bug.commit() + except: + "Bug for '%s' was not filed." % config["sourcepackage"] def read_buglist(url): BugList = Connector.ConnectBugList() @@ -111,10 +115,7 @@ def main(): for pack in pack_list: if pack not in buglist: - config["text"] = config["text"].replace("$pack", pack) - config["subject"] = config["subject"].replace("$pack", pack) config["sourcepackage"] = pack - file_bug(config)