From: Luca Falavigna Date: Sat, 4 Feb 2012 12:08:15 +0000 (+0000) Subject: Check whether some mandatory keys are available X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b5e146febc5246a8ae9c7a8ba7bfa87caa7ccb06;p=dak.git Check whether some mandatory keys are available Signed-off-by: Luca Falavigna --- diff --git a/daklib/queue.py b/daklib/queue.py index ce6ecdf6..9d1e3866 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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