mirror of
https://github.com/frappe/bench.git
synced 2025-02-03 19:38:24 +00:00
[fix] accept domains as tuple argument
This commit is contained in:
parent
e968df3e39
commit
7ae4f993d4
@ -160,17 +160,18 @@ def remove_domain(domain, site=None):
|
|||||||
remove_domain(site, domain, bench_path='.')
|
remove_domain(site, domain, bench_path='.')
|
||||||
|
|
||||||
@click.command('sync-domains')
|
@click.command('sync-domains')
|
||||||
@click.argument('domains')
|
@click.option('--domain', multiple=True)
|
||||||
@click.option('--site', prompt=True)
|
@click.option('--site', prompt=True)
|
||||||
def sync_domains(domains, site=None):
|
def sync_domains(domain=None, site=None):
|
||||||
from bench.config.site_config import sync_domains
|
from bench.config.site_config import sync_domains
|
||||||
|
|
||||||
if not site:
|
if not site:
|
||||||
print("Please specify site")
|
print("Please specify site")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
domains = json.loads(domains)
|
try:
|
||||||
if not isinstance(domains, list):
|
domains = list(map(str,domain))
|
||||||
|
except Exception:
|
||||||
print("Domains should be a json list of strings or dictionaries")
|
print("Domains should be a json list of strings or dictionaries")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user