From b5e146febc5246a8ae9c7a8ba7bfa87caa7ccb06 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 4 Feb 2012 12:08:15 +0000 Subject: [PATCH] Check whether some mandatory keys are available Signed-off-by: Luca Falavigna --- daklib/queue.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5