From 34401eefe6c6bc58c5e73ff4cf9d8681f82ddb53 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 4 Mar 2019 07:12:57 +0100 Subject: [PATCH] fix indentation and wp-cli path --- install | 2 +- setup.py | 2 +- wo/cli/plugins/site_functions.py | 77 ++++++++++++++++---------------- wo/cli/plugins/stack.py | 14 +++--- wo/cli/plugins/stack_upgrade.py | 8 ++-- 5 files changed, 51 insertions(+), 52 deletions(-) diff --git a/install b/install index feb3d93..2ba9a78 100644 --- a/install +++ b/install @@ -588,7 +588,7 @@ function wo_update_latest() # Fix for 3.3.2 renamed nginx.conf - nginx -V 2>&1 &>>/dev/null + nginx -V &>>/dev/null 2>&1 if [[ $? -eq 0 ]]; then nginx -t 2>&1 | grep 'open() "/etc/nginx/nginx.conf" failed' &>>/dev/null if [[ $? -eq 0 ]]; then diff --git a/setup.py b/setup.py index b4a9db7..dfc2cdb 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ except Exception as e: os.system("git config --global user.email {0}".format(wo_email)) if not os.path.isfile('/root/.gitconfig'): - shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') + shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') setup(name='wo', version='3.9.5', diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index f724e69..43c376c 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -54,9 +54,9 @@ def check_domain_exists(self, domain): def setupdomain(self, data): - #for debug purpose - # for key, value in data.items() : - # print (key, value) + # for debug purpose + # for key, value in data.items() : + # print (key, value) wo_domain_name = data['site_name'] wo_site_webroot = data['webroot'] if 'webroot' in data.keys() else '' @@ -100,7 +100,6 @@ def setupdomain(self, data): raise SiteError("created nginx configuration failed for site." " check with `nginx -t`") - # create symbolic link for WOFileUtils.create_symlink(self, ['/etc/nginx/sites-available/{0}' .format(wo_domain_name), @@ -323,9 +322,9 @@ def setupwordpress(self, data): .format(wo_domain_name) if data['wpredis'] else ''), log=False - ): + ): pass - else : + else: raise SiteError("generate wp-config failed for wp single site") except CommandExecutionError as e: raise SiteError("generate wp-config failed for wp single site") @@ -346,46 +345,45 @@ def setupwordpress(self, data): "\n\ndefine(\'WP_DEBUG\', false);")) try: if WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root" - .format(WOVariables.wo_wpcli_path) - + " core config " - + "--dbname=\'{0}\' --dbprefix=\'{1}\' " - "--dbhost=\'{2}\' " - .format(data['wo_db_name'], wo_wp_prefix, - data['wo_db_host']) - + "--dbuser=\'{0}\' --dbpass=\'{1}\' " - "--extra-php<