From 58733cdf29683062d74920af9b53ecbef7ae187a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 6 Jul 2018 17:53:30 +0530 Subject: [PATCH] [remove] mycli --- frappe/commands/utils.py | 17 +++++------------ requirements.txt | 1 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index 718aa30f8f..0ab09a7578 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -300,26 +300,19 @@ def mariadb(context): Enter into mariadb console for a given site. """ import os - import os.path as osp site = get_site(context) frappe.init(site=site) # This is assuming you're within the bench instance. - path = os.getcwd() - mysql = osp.join(path, '..', 'env', 'bin', 'mycli') - args = [ + mysql = find_executable('mysql') + os.execv(mysql, [ mysql, '-u', frappe.conf.db_name, - '-p', frappe.conf.db_password, + '-p'+frappe.conf.db_password, + frappe.conf.db_name, '-h', frappe.conf.db_host or "localhost", - '-D', frappe.conf.db_name, - '-R', '{site}> '.format(site = site), - '--auto-vertical-output', - '--warn' - ] - - os.execv(mysql, args) + "-A"]) @click.command('console') @pass_context diff --git a/requirements.txt b/requirements.txt index 5f358a402b..9bf61b0424 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,7 +45,6 @@ pypng premailer croniter googlemaps -mycli braintree future passlib