From 4c2f7648021d1db257d4630b25158718fef66b56 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Tue, 26 Jul 2011 14:34:32 +0100 Subject: [PATCH] Only use PackagesServer if it exists Signed-off-by: Mark Hymers --- dak/override.py | 5 ++++- dak/rm.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dak/override.py b/dak/override.py index 3d2a9aba..410a3d3d 100755 --- a/dak/override.py +++ b/dak/override.py @@ -296,7 +296,10 @@ def main (): Subst["__BCC__"] = "Bcc: " + ", ".join(bcc) else: Subst["__BCC__"] = "X-Filler: 42" - Subst["__CC__"] = "Cc: " + package + "@" + cnf["Dinstall::PackagesServer"] + "\nX-DAK: dak override" + if cnf.has_key("Dinstall::PackagesServer"): + Subst["__CC__"] = "Cc: " + package + "@" + cnf["Dinstall::PackagesServer"] + "\nX-DAK: dak override" + else: + Subst["__CC__"] = "X-DAK: dak override" Subst["__ADMIN_ADDRESS__"] = cnf["Dinstall::MyAdminAddress"] Subst["__DISTRO__"] = cnf["Dinstall::MyDistribution"] Subst["__WHOAMI__"] = utils.whoami() diff --git a/dak/rm.py b/dak/rm.py index 7377f23b..2e023b7e 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -338,7 +338,8 @@ def main (): carbon_copy.append(copy_to + "@" + cnf["Dinstall::BugServer"]) elif copy_to == 'package': for package in arguments: - carbon_copy.append(package + "@" + cnf["Dinstall::PackagesServer"]) + if cnf.has_key("Dinstall::PackagesServer"): + carbon_copy.append(package + "@" + cnf["Dinstall::PackagesServer"]) if cnf.has_key("Dinstall::TrackingServer"): carbon_copy.append(package + "@" + cnf["Dinstall::TrackingServer"]) elif '@' in copy_to: -- 2.39.5