From c923c14901a2e9215c42f072607a1cc3ffe675ab Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 4 Aug 2010 14:40:38 +0200 Subject: some fixes --- module/FileDatabase.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'module/FileDatabase.py') diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 8daacf050..b24467612 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -129,15 +129,13 @@ class FileHandler: if self.packageCache.has_key(id): del self.packageCache[id] - toDelete = [] - - for pyfile in self.cache.itervalues(): + pyfiles = self.cache.values() + + for pyfile in pyfiles: if pyfile.packageid == id: pyfile.abortDownload() - toDelete.append(pyfile.id) + pyfile.release() - for pid in toDelete: - del self.cache[pid] self.db.deletePackage(id) @@ -155,7 +153,6 @@ class FileHandler: if id in self.core.threadManager.processingIds(): self.cache[id].abortDownload() - #del self.cache[id] self.lock.release() @@ -626,7 +623,6 @@ class PyFile(): def abortDownload(self): """abort pyfile if possible""" - self.m.core.log.info(_("Download aborted: %s" % self.name)) while self.id in self.m.core.threadManager.processingIds(): self.abort = True if self.plugin: self.plugin.req.abort = True -- cgit v1.2.3