]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
Re-Implement the bms check in cruft-report.
[dak.git] / daklib / dbconn.py
index d4b14293161a321a3630acae51e8bbf9c6deb741..aa71c180073f1986b764ffb9bf450158e1213dfe 100755 (executable)
@@ -1161,8 +1161,8 @@ class PoolFile(ORMObject):
     def fullpath(self):
         return os.path.join(self.location.path, self.filename)
 
-    def is_valid(self, filesize = -1, md5sum = None):\
-        return self.filesize == filesize and self.md5sum == md5sum
+    def is_valid(self, filesize = -1, md5sum = None):
+        return self.filesize == long(filesize) and self.md5sum == md5sum
 
     def properties(self):
         return ['filename', 'file_id', 'filesize', 'md5sum', 'sha1sum', \
@@ -1583,7 +1583,8 @@ class Location(ORMObject):
         self.archive_type = 'pool'
 
     def properties(self):
-        return ['path', 'archive_type', 'component', 'files_count']
+        return ['path', 'location_id', 'archive_type', 'component', \
+            'files_count']
 
     def not_null_constraints(self):
         return ['path', 'archive_type']