2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 10:38:58 +00:00

Merge pull request #433 from frappe/fix-new-site

fix: change import path for new_site command
This commit is contained in:
Revant Nandgaonkar 2021-03-01 06:44:09 +05:30 committed by GitHub
commit 5121e27106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@ import os
import frappe
import semantic_version
from frappe.commands.site import _new_site
from frappe.installer import update_site_config
from constants import COMMON_SITE_CONFIG_FILE, RDS_DB, RDS_PRIVILEGES
from utils import (
@ -12,6 +11,16 @@ from utils import (
get_password,
)
# try to import _new_site from frappe, which could possibly
# exist in either commands.py or installer.py, and so we need
# to maintain compatibility across all frappe versions.
try:
# <= version-{11,12}
from frappe.commands.site import _new_site
except ImportError:
# >= version-13 and develop
from frappe.installer import _new_site
def main():
config = get_config()