mediapipeline: change cache variable by domaininfo

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40246
This commit is contained in:
Daniel Grana 2008-09-16 19:31:25 +00:00
parent 41a4f22c27
commit 5048491f8d
1 changed files with 4 additions and 4 deletions

View File

@ -21,16 +21,16 @@ class DomainInfo(object):
class MediaPipeline(object):
def __init__(self):
self.cache = {}
self.domaininfo = {}
def open_domain(self, domain):
self.cache[domain] = DomainInfo(domain)
self.domaininfo[domain] = DomainInfo(domain)
def close_domain(self, domain):
del self.cache[domain]
del self.domaininfo[domain]
def process_item(self, domain, response, item):
info = self.cache[domain]
info = self.domaininfo[domain]
requests = self.get_media_requests(item, info)
assert requests is None or hasattr(requests, '__iter__'), \
'get_media_requests should return None or iterable'