[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Use correct value for __SUITE__ template variable



Hi,

my last patch[1] did ignore the fact that pkg.changes["distribution"] is
a dict and not a simple string.  Joerg changed the code to use
pkg.changes["distribution"].keys() instead, but this still results in
unwanted things[2] in the variable.

I suggest to use ", ".join(pkg.changes["distribution"]) instead, patch
attached.

Regards,
Ansgar

[1] <http://lists.debian.org/debian-dak/2010/09/msg00000.html>
[2] As in the Subject of
    <http://lists.debian.org/debian-backports-changes/2010/09/msg00124.html>

>From e76325f21d746e133e826c134a57d9b1dde8089a Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <ansgar@43-1.org>
Date: Sun, 12 Sep 2010 16:24:42 +0900
Subject: [PATCH] Use correct value for __SUITE__ template variable

Concatenate all distribution names from the .changes file using ", " as
a separator.

Signed-off-by: Ansgar Burchardt <ansgar@43-1.org>
---
 daklib/queue.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daklib/queue.py b/daklib/queue.py
index 64ef0f2..c4c4b53 100755
--- a/daklib/queue.py
+++ b/daklib/queue.py
@@ -353,7 +353,7 @@ class Upload(object):
         self.Subst["__REJECT_MESSAGE__"] = self.package_info()
         self.Subst["__SOURCE__"] = self.pkg.changes.get("source", "Unknown")
         self.Subst["__VERSION__"] = self.pkg.changes.get("version", "Unknown")
-        self.Subst["__SUITE__"] = self.pkg.changes["distribution"].keys()
+        self.Subst["__SUITE__"] = ", ".join(self.pkg.changes["distribution"])
 
     ###########################################################################
     def load_changes(self, filename):
-- 
1.7.1


Reply to: