From 95869142f94f5737f97204d3e8b9e831656847a5 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Mon, 3 Aug 2015 21:45:57 +0530 Subject: [PATCH] Fix error handling and clean up EE footprint on database error during new site create --- ee/core/mysql.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ee/core/mysql.py b/ee/core/mysql.py index acea0505..3435b867 100644 --- a/ee/core/mysql.py +++ b/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