From 9b9e1c34bfd5b9527c71fdc8db6cb3024482c0c9 Mon Sep 17 00:00:00 2001 From: Alexander Reichle-Schmehl Date: Tue, 28 Sep 2010 15:45:18 +0000 Subject: [PATCH] Only log, if there is something to log --- dak/rm.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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:") -- 2.39.5