From d0c21a999ba8ddf0c1956415a27f215baa2f727d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 10 Jul 2011 21:45:09 +0200 Subject: more documentation, some fixes --- module/database/FileDatabase.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/database/FileDatabase.py') diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index 96b505fe0..3e2f37976 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -95,8 +95,8 @@ class FileHandler: data = self.db.getAllLinks(queue) packs = self.db.getAllPackages(queue) - data.update([(str(x.id), x.toDbDict()[x.id]) for x in self.cache.itervalues()]) - packs.update([(str(x.id), x.toDict()[x.id]) for x in self.packageCache.itervalues() if x.queue == queue]) + data.update([(str(x.id), x.toDbDict()[x.id]) for x in self.cache.values()]) + packs.update([(str(x.id), x.toDict()[x.id]) for x in self.packageCache.values() if x.queue == queue]) for key, value in data.iteritems(): if packs.has_key(str(value["package"])): @@ -351,9 +351,10 @@ class FileHandler: """checks if all files are finished and dispatch event""" if not self.getQueueCount(True): - #hope its not called twice + #hope its not called together with all DownloadsProcessed self.core.hookManager.dispatchEvent("allDownloadsProcessed") self.core.hookManager.dispatchEvent("allDownloadsFinished") + self.core.log.debug("All downloads finished") return True return False @@ -365,6 +366,7 @@ class FileHandler: if not self.db.processcount(1): self.core.hookManager.dispatchEvent("allDownloadsProcessed") + self.core.log.debug("All downloads processed") return True return False -- cgit v1.2.3