Browse Source

add return value

feature/refactor-php
Prabuddha Chakraborty 10 years ago
parent
commit
4e6418d1ae
  1. 15
      ee/cli/plugins/site.py

15
ee/cli/plugins/site.py

@ -1306,7 +1306,20 @@ class EESiteUpdateController(CementBaseController):
if oldcachetype != 'wpredis' and data['wpredis']:
try:
installwp_plugin(self, 'redis-cache', data)
if installwp_plugin(self, 'redis-cache', data):
try:
wpconfig = open("{0}/wp-config.php".format(ee_site_webroot),
encoding='utf-8', mode='a')
wpconfig.write("\n\ndefine( \'WP_CACHE_KEY_SALT\', \'{0}:\' );"
.format(ee_domain))
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. "
"Could not append:"
" define( 'WP_CACHE_KEY_SALT', '{sitename}:' );")
except SiteError as e:
Log.debug(self, str(e))
Log.info(self, Log.FAIL + "Update site failed."

Loading…
Cancel
Save