Browse Source

Fix error handling and clean up EE footprint on database error during new site create

feature/refactor-php
Prabuddha Chakraborty 10 years ago
parent
commit
95869142f9
  1. 6
      ee/core/mysql.py

6
ee/core/mysql.py

@ -52,6 +52,9 @@ class EEMysql():
except pymysql.err.InternalError as e:
Log.debug(self, str(e))
raise MySQLConnectionError
except Exception as e :
Log.debug(self, "[Error]Setting up database: \'" + str(e) + "\'")
raise MySQLConnectionError
def execute(self, statement, errormsg='', log=True):
"""Get login details from ~/.my.cnf & Execute MySQL query"""
@ -124,4 +127,5 @@ class EEMysql():
return False
except MySQLConnectionError as e:
Log.debug(self, str(e))
return False
raise MySQLConnectionError
#return False

Loading…
Cancel
Save