From: Luca Falavigna Date: Fri, 17 Sep 2010 15:20:40 +0000 (+0000) Subject: Check if fpr is set before accessing its methods X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=594be88c3e0b1c50943840b0f63db69a6fe8adc1;p=dak.git Check if fpr is set before accessing its methods Signed-off-by: Luca Falavigna --- diff --git a/daklib/queue.py b/daklib/queue.py index c4c4b53f..c5e6ca74 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -337,7 +337,7 @@ class Upload(object): if self.pkg.changes.has_key('fingerprint'): 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): + if fpr and self.check_if_upload_is_sponsored("%s@debian.org" % fpr.uid.uid, fpr.uid.name): if self.pkg.changes.has_key("sponsoremail"): self.Subst["__MAINTAINER_TO__"] += ", %s" % self.pkg.changes["sponsoremail"] session.close()