diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-01 21:51:21 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-01 21:51:21 +0200 |
commit | 18439253b659e3ad9fb9edfd5cacbba116e17849 (patch) | |
tree | 2b6ce8cebfe1636cc1122d6156305d78b4863491 /module | |
parent | ul.to version increment (diff) | |
download | pyload-18439253b659e3ad9fb9edfd5cacbba116e17849.tar.xz |
db fixes
Diffstat (limited to 'module')
-rw-r--r-- | module/FileDatabase.py | 9 |
1 files changed, 5 insertions, 4 deletions
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): |