fix: Check if site exists before new-site
This commit is contained in:
parent
abf54a0866
commit
9cafae9d53
1 changed files with 4 additions and 0 deletions
|
|
@ -40,6 +40,10 @@ def _new_site(db_name, site, mariadb_root_username=None, mariadb_root_password=N
|
|||
reinstall=False, db_type=None):
|
||||
"""Install a new Frappe site"""
|
||||
|
||||
if os.path.exists(site):
|
||||
print('Site {0} already exists'.format(site))
|
||||
sys.exit(1)
|
||||
|
||||
if not db_name:
|
||||
db_name = '_' + hashlib.sha1(site.encode()).hexdigest()[:16]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue