]> err.no Git - dak/commitdiff
daklib/queue.py: send mails to sponsors too
authorLuca Falavigna <dktrkranz@debian.org>
Sat, 28 Aug 2010 14:17:10 +0000 (14:17 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sat, 28 Aug 2010 14:17:10 +0000 (14:17 +0000)
sponsoremail is not adjusted anymore, so check whether
a given upload has been sponsored in order to fill that
field. This addresses bug #568369.

Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
daklib/queue.py

index 8d814e86c077828c2e7187f3de2e04416cb1d47a..afd3277840ed153b7972eba59191eb19623b04f6 100755 (executable)
@@ -329,8 +329,11 @@ class Upload(object):
             self.Subst["__MAINTAINER_TO__"] = self.pkg.changes["maintainer2047"]
             self.Subst["__MAINTAINER__"] = self.pkg.changes.get("maintainer", "Unknown")
 
-        if "sponsoremail" in self.pkg.changes:
+        session = DBConn().session()
+        fpr = get_fingerprint(self.pkg.changes['fingerprint'], session)
+        if self.check_if_upload_is_sponsored("%s@debian.org" % fpr.uid.uid, fpr.uid.name):
             self.Subst["__MAINTAINER_TO__"] += ", %s" % self.pkg.changes["sponsoremail"]
+        session.close()
 
         if cnf.has_key("Dinstall::TrackingServer") and self.pkg.changes.has_key("source"):
             self.Subst["__MAINTAINER_TO__"] += "\nBcc: %s@%s" % (self.pkg.changes["source"], cnf["Dinstall::TrackingServer"])