diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index dd79b781..0690a2bf 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -90,7 +90,7 @@ class EEStackController(CementBaseController): Log.debug(self, 'Adding key for {0}' .format(EEVariables.ee_mysql_repo)) EERepo.add_key(self, '1C4CBDCDCD2EFD2A', - keyserver="http://keyserver.ubuntu.com:80") + keyserver="keyserver.ubuntu.com") chars = ''.join(random.sample(string.ascii_letters, 8)) Log.debug(self, "Pre-seeding MySQL") EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " diff --git a/ee/core/mysql.py b/ee/core/mysql.py index c40b2bfd..cc245ede 100644 --- a/ee/core/mysql.py +++ b/ee/core/mysql.py @@ -48,6 +48,9 @@ class EEMysql(): .format(statement)) cur.execute(statement) + cur.close() + conn.close() + except Exception as e: cur.close() conn.close() @@ -57,8 +60,6 @@ class EEMysql(): else: Log.error(self, '{0}'.format(errormsg)) - cur.close() - conn.close() # def __del__(self): # self.cur.close()