simplified Config.get_supported_sites()
This commit is contained in:
parent
7e8ed08a28
commit
5a8f794057
|
@ -795,12 +795,10 @@ class Config:
|
||||||
|
|
||||||
def get_supported_sites(self, all=False):
|
def get_supported_sites(self, all=False):
|
||||||
"""Returns the list of supported sites."""
|
"""Returns the list of supported sites."""
|
||||||
the_sites = []
|
if all:
|
||||||
for site in self.supported_sites.keys():
|
return self.supported_sites.keys()
|
||||||
params = self.get_site_parameters(site)
|
else:
|
||||||
if all or params['enabled']:
|
return [site_name for (site_name, site) in self.supported_sites.items() if site.enabled]
|
||||||
the_sites.append(site)
|
|
||||||
return the_sites
|
|
||||||
|
|
||||||
def get_site_parameters(self, site):
|
def get_site_parameters(self, site):
|
||||||
"""Returns a dict of the site parameters for the specified site"""
|
"""Returns a dict of the site parameters for the specified site"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user