]> git.decadent.org.uk Git - dak.git/commitdiff
Check whether some mandatory keys are available
authorLuca Falavigna <dktrkranz@debian.org>
Sat, 4 Feb 2012 12:08:15 +0000 (12:08 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sat, 4 Feb 2012 12:08:15 +0000 (12:08 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
daklib/queue.py

index ce6ecdf6b2f5cf655d44b84da93c7cd1f8cb0a44..9d1e386653930709661aef190d85885a726b6804 100755 (executable)
@@ -1657,6 +1657,9 @@ class Upload(object):
                     self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_info()[0], sys.exc_info()[1]))
 
     def check_if_upload_is_sponsored(self, uid_email, uid_name):
+        for key in "maintaineremail", "changedbyemail", "maintainername", "changedbyname":
+            if not self.pkg.changes.has_key(key):
+                return False
         uid_email = '@'.join(uid_email.split('@')[:2])
         if uid_email in [self.pkg.changes["maintaineremail"], self.pkg.changes["changedbyemail"]]:
             sponsored = False