diff options
| author | 2010-08-04 14:40:38 +0200 | |
|---|---|---|
| committer | 2010-08-04 14:40:38 +0200 | |
| commit | c923c14901a2e9215c42f072607a1cc3ffe675ab (patch) | |
| tree | 3dc3ae59a2f5a9dc479af7621ead7cda2f9e3fb5 /module/FileDatabase.py | |
| parent | more fixing (diff) | |
| download | pyload-c923c14901a2e9215c42f072607a1cc3ffe675ab.tar.xz | |
some fixes
Diffstat (limited to 'module/FileDatabase.py')
| -rw-r--r-- | module/FileDatabase.py | 12 | 
1 files changed, 4 insertions, 8 deletions
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  | 
