From: Joerg Jaspert Date: Fri, 28 Jan 2011 21:12:59 +0000 (+0100) Subject: fix is_valid of PoolFile to compare a long with a long, not a str X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=f698f038afdccb07487c104dac7c83d3120b6de3;p=dak.git fix is_valid of PoolFile to compare a long with a long, not a str Signed-off-by: Joerg Jaspert --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index efe2d137..1fca9839 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -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', \