mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
fix: bench.utils.get_sites updated to frappe.utils.get_sites
avoids issues with non sites folder like 'jupyter_notebooks'
This commit is contained in:
parent
073f6d00a4
commit
a3dc9e69b7
@ -208,10 +208,15 @@ def build_assets(bench_path='.', app=None):
|
||||
exec_cmd(command, cwd=bench_path)
|
||||
|
||||
def get_sites(bench_path='.'):
|
||||
sites_dir = os.path.join(bench_path, "sites")
|
||||
sites = [site for site in os.listdir(sites_dir)
|
||||
if os.path.isdir(os.path.join(sites_dir, site)) and site not in ('assets',)]
|
||||
return sites
|
||||
sites_path = os.path.join(bench_path, 'sites')
|
||||
sites = []
|
||||
for site in os.listdir(sites_path):
|
||||
path = os.path.join(sites_path, site)
|
||||
if (os.path.isdir(path)
|
||||
and not os.path.islink(path)
|
||||
and os.path.exists(os.path.join(path, 'site_config.json'))):
|
||||
sites.append(site)
|
||||
return sorted(sites)
|
||||
|
||||
def get_sites_dir(bench_path='.'):
|
||||
return os.path.abspath(os.path.join(bench_path, 'sites'))
|
||||
|
Loading…
Reference in New Issue
Block a user