]> git.decadent.org.uk Git - dak.git/commitdiff
Check if fpr is set before accessing its methods
authorLuca Falavigna <dktrkranz@debian.org>
Fri, 17 Sep 2010 15:20:40 +0000 (15:20 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Fri, 17 Sep 2010 15:20:40 +0000 (15:20 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
daklib/queue.py

index c4c4b53fc3f7dd42b28226d3e6974be290ea5ac1..c5e6ca74c7b8103efa7c342adacdbcdf291c5035 100755 (executable)
@@ -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()