]> err.no Git - dak/commitdiff
daklib/dbconn.py: f.poolfile might be None
authorAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 15:19:41 +0000 (15:19 +0000)
committerAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 15:21:16 +0000 (15:21 +0000)
Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
daklib/dbconn.py

index 6948cf6c27902528030c17f0f8f602811a3b79dc..8da26063607d7d501b224162fb1630118b48a5ff 100755 (executable)
@@ -856,8 +856,8 @@ class BuildQueue(object):
 
         # Check if we have a file of this name or this ID already
         for f in self.queuefiles:
-            if f.fileid is not None and f.fileid == poolfile.file_id or \
-               f.poolfile.filename == poolfile_basename:
+            if (f.fileid is not None and f.fileid == poolfile.file_id) or \
+               (f.poolfile is not None and f.poolfile.filename == poolfile_basename):
                    # In this case, update the BuildQueueFile entry so we
                    # don't remove it too early
                    f.lastused = datetime.now()