From: Alexander Reichle-Schmehl Date: Tue, 28 Sep 2010 15:45:18 +0000 (+0000) Subject: Only log, if there is something to log X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b9e1c34bfd5b9527c71fdc8db6cb3024482c0c9;p=dak Only log, if there is something to log --- diff --git a/dak/rm.py b/dak/rm.py index 0f7c9f2a..936468cf 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -647,14 +647,16 @@ def main (): utils.fubar("Closing bugs for multiple source pakcages is not supported. Do it yourself.") Subst_close_other["__BUG_NUMBER_ALSO__"] = "" Subst_close_other["__SOURCE__"] = source_pkg - logfile.write("Also closing bug(s):") - logfile822.write("Also-Bugs:") - for bug in bts.get_bugs('src', source.split("_", 1)[0], 'status', 'open'): - Subst_close_other["__BUG_NUMBER_ALSO__"] += str(bug) + "-done@" + cnf["Dinstall::BugServer"] + "," - logfile.write(" " + str(bug)) - logfile822.write(" " + str(bug)) - logfile.write("\n") - logfile822.write("\n") + other_bugs = bts.get_bugs('src', source_pkg, 'status', 'open') + if other_bugs: + logfile.write("Also closing bug(s):") + logfile822.write("Also-Bugs:") + for bug in other_bugs: + Subst_close_other["__BUG_NUMBER_ALSO__"] += str(bug) + "-done@" + cnf["Dinstall::BugServer"] + "," + logfile.write(" " + str(bug)) + logfile822.write(" " + str(bug)) + logfile.write("\n") + logfile822.write("\n") if source_pkg in wnpp.keys(): logfile.write("Also closing WNPP bug(s):") logfile822.write("Also-WNPP:")