engine: added domain_is_open() method, added docstring for domain_is_closed() method

This commit is contained in:
Pablo Hoffman 2009-06-25 09:56:38 -03:00
parent 8de09fe4dd
commit c22d2b1587
1 changed files with 7 additions and 0 deletions

View File

@ -190,8 +190,15 @@ class ExecutionEngine(object):
return not (pending or downloading or haspipe or scraping)
def domain_is_closed(self, domain):
"""Return True if the domain is fully closed (ie. not even in the
closing stage)"""
return domain not in self.downloader.sites
def domain_is_open(self, domain):
"""Return True if the domain is fully opened (ie. not in closing
stage)"""
return domain in self.downloader.sites and domain not in self.closing
@property
def open_domains(self):
return self.downloader.sites.keys()