Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 4347:0e33bf5571dc
make some more memorydb tests pass
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 05 Feb 2010 05:10:52 +0000 |
| parents | 94ee533613ac |
| children | 887a153cedec |
comparison
equal
deleted
inserted
replaced
| 4346:4dc575b33712 | 4347:0e33bf5571dc |
|---|---|
| 359 # get the files for this message | 359 # get the files for this message |
| 360 message_files = [] | 360 message_files = [] |
| 361 if msgid : | 361 if msgid : |
| 362 for fileid in messages.get(msgid, 'files') : | 362 for fileid in messages.get(msgid, 'files') : |
| 363 # check the attachment size | 363 # check the attachment size |
| 364 filename = self.db.filename('file', fileid, None) | 364 filesize = self.db.filesize('file', fileid, None) |
| 365 filesize = os.path.getsize(filename) | |
| 366 if filesize <= self.db.config.NOSY_MAX_ATTACHMENT_SIZE: | 365 if filesize <= self.db.config.NOSY_MAX_ATTACHMENT_SIZE: |
| 367 message_files.append(fileid) | 366 message_files.append(fileid) |
| 368 else: | 367 else: |
| 369 base = self.db.config.TRACKER_WEB | 368 base = self.db.config.TRACKER_WEB |
| 370 link = "".join((base, files.classname, fileid)) | 369 link = "".join((base, files.classname, fileid)) |
