[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] daklib/dbconn.py: f.poolfile might be None



Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
---
 daklib/dbconn.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index 6948cf6..8da2606 100755
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -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()
-- 
1.7.2.5


Reply to: