]> err.no Git - dak/commitdiff
Only use PackagesServer if it exists
authorMark Hymers <mhy@debian.org>
Tue, 26 Jul 2011 13:34:32 +0000 (14:34 +0100)
committerMark Hymers <mhy@debian.org>
Tue, 26 Jul 2011 13:34:32 +0000 (14:34 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/override.py
dak/rm.py

index 3d2a9aba20b100e745a06b129c32e194960bdfe2..410a3d3dee2ff6be4d81330664b7f4afce2bd460 100755 (executable)
@@ -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()
index 7377f23b5b7236382e67d002005e71ac0932d800..2e023b7e0e0043c8c9bc342ad3c70806cb7c7f10 100755 (executable)
--- 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: