Browse Source

Merge branch 'python' of github.com:rtCamp/easyengine into python

bugfixes
shital.rtcamp 10 years ago
parent
commit
4bde9fb908
  1. 2
      ee/cli/plugins/site.py
  2. 4
      ee/cli/plugins/site_functions.py
  3. 10
      ee/core/mysql.py

2
ee/cli/plugins/site.py

@ -250,7 +250,7 @@ class EESiteCreateController(CementBaseController):
ee_db_name='', ee_db_user='', ee_db_pass='')
setup_domain(self, data)
if 'ee_db_name' in data.keys():
if 'ee_db_name' in data.keys() and not data['wp']:
data = setup_database(self, data)
if data['wp']:
setup_wordpress(self, data)

4
ee/cli/plugins/site_functions.py

@ -127,8 +127,8 @@ def setup_wordpress(self, data):
ee_random = (''.join(random.sample(string.ascii_uppercase +
string.ascii_lowercase + string.digits, 15)))
print("Downloading Wordpress, please wait...")
EEShellExec.cmd_exec(self, "wp --allow-root core download"
"--path={0}/htdocs/".format(ee_site_webroot))
EEFileUtils.chdir(self, '{0}/htdocs/'.format(ee_site_webroot))
EEShellExec.cmd_exec(self, "wp --allow-root core download")
setup_database(self, data)
if prompt_wpprefix == 'True':

10
ee/core/mysql.py

@ -2,6 +2,7 @@
import pymysql
import configparser
from os.path import expanduser
import sys
class EEMysql():
@ -29,18 +30,17 @@ class EEMysql():
cur = conn.cursor()
except Exception as e:
self.app.log.error('Unable to connect to database: {0}'
.format(e.strerror))
return False
.format(e))
sys.exit(1)
try:
cur.execute(statement)
except Exception as e:
self.app.log.error('Error occured while executing: {0}'
.format(e.strerror))
self.app.log.info("Error occured while executing "+statement)
.format(e))
cur.close()
conn.close()
return False
sys.exit(1)
cur.close()
conn.close()

Loading…
Cancel
Save