Browse Source

Update warn message on error in editing wp-config.php

feature/refactor-php
Prabuddha Chakraborty 10 years ago
parent
commit
0828a64fe1
  1. 11
      ee/cli/plugins/site.py

11
ee/cli/plugins/site.py

@ -1307,7 +1307,8 @@ class EESiteUpdateController(CementBaseController):
if oldcachetype != 'wpredis' and data['wpredis']:
try:
if installwp_plugin(self, 'redis-cache', data):
if EEShellExec.cmd_exec(self, "grep -r \"WP_CACHE_KEY_SALT\" {0}/wp-config.php".format(ee_site_webroot)):
if EEShellExec.cmd_exec(self, "grep -r \"WP_CACHE_KEY_SALT\" {0}/wp-config.php"
.format(ee_site_webroot)):
pass
else:
try:
@ -1318,11 +1319,11 @@ class EESiteUpdateController(CementBaseController):
wpconfig.close()
except IOError as e:
Log.debug(self, str(e))
Log.debug(self, "Editing wp-config.php failed.")
Log.info(self, Log.FAIL + "Editing wp-config failed. "
Log.debug(self, "Updating wp-config.php failed.")
Log.warn(self, "Updating wp-config.php failed. "
"Could not append:"
" define( \'WP_CACHE_KEY_SALT\', \'{0}:\' );".format(ee_domain))
"\ndefine( \'WP_CACHE_KEY_SALT\', \'{0}:\' );".format(ee_domain) +
"\nPlease add manually")
except SiteError as e:
Log.debug(self, str(e))
Log.info(self, Log.FAIL + "Update site failed."

Loading…
Cancel
Save