]> err.no Git - dak/commitdiff
fix is_valid of PoolFile to compare a long with a long, not a str
authorJoerg Jaspert <joerg@debian.org>
Fri, 28 Jan 2011 21:12:59 +0000 (22:12 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 28 Jan 2011 21:12:59 +0000 (22:12 +0100)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
daklib/dbconn.py

index efe2d13761551a7f243c512a81cd779a33b35a0f..1fca9839d73baf31787904a6f27cb0415ce51936 100755 (executable)
@@ -1162,7 +1162,7 @@ class PoolFile(ORMObject):
         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
+        return self.filesize == long(filesize) and self.md5sum == md5sum
 
     def properties(self):
         return ['filename', 'file_id', 'filesize', 'md5sum', 'sha1sum', \