returns dict with package information
(self, id)
| 252 | |
| 253 | #---------------------------------------------------------------------- |
| 254 | def getPackageData(self, id): |
| 255 | """returns dict with package information""" |
| 256 | pack = self.getPackage(id) |
| 257 | |
| 258 | if not pack: |
| 259 | return None |
| 260 | |
| 261 | pack = pack.toDict()[id] |
| 262 | |
| 263 | data = self.db.getPackageData(id) |
| 264 | |
| 265 | tmplist = [] |
| 266 | |
| 267 | cache = self.cache.values() |
| 268 | for x in cache: |
| 269 | if int(x.toDbDict()[x.id]["package"]) == int(id): |
| 270 | tmplist.append((x.id, x.toDbDict()[x.id])) |
| 271 | data.update(tmplist) |
| 272 | |
| 273 | pack["links"] = data |
| 274 | |
| 275 | return pack |
| 276 | |
| 277 | #---------------------------------------------------------------------- |
| 278 | def getFileData(self, id): |
no test coverage detected