From 18439253b659e3ad9fb9edfd5cacbba116e17849 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 1 Sep 2010 21:51:21 +0200 Subject: db fixes --- module/FileDatabase.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/FileDatabase.py') diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 9e1e84e8c..d4f28d887 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -261,7 +261,9 @@ class FileHandler: data = self.db.getPackageData(id) tmplist = [] - for x in self.cache.itervalues(): + + cache = self.cache.values() + for x in cache: if int(x.toDbDict()[x.id]["package"]) == int(id): tmplist.append((str(x.id), x.toDbDict()[x.id])) data.update(tmplist) @@ -801,8 +803,7 @@ class FileDatabaseBackend(Thread): """return pyfile instance, which is suitable for download and dont use a occupied plugin""" cmd = "(" - i = 0 - for item in occ: + for i, item in enumerate(occ): if i != 0: cmd += ", " cmd += "'%s'" % item @@ -922,7 +923,7 @@ class PyFile(): if self.plugin and self.plugin.req: self.plugin.req.abort = True sleep(0.1) - abort = False + self.abort = False if self.plugin and self.plugin.req: self.plugin.req.abort = False def finishIfDone(self): -- cgit v1.2.3