mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
remove-app: fix for python3.7
"bench remove-app <app>" exits with TypeError on python3.7 converting the subprocess output to string fixes this issue. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
b5657c160c
commit
ce7a5e757d
@ -191,7 +191,7 @@ def remove_app(app, bench_path='.'):
|
|||||||
for site in os.listdir(site_path):
|
for site in os.listdir(site_path):
|
||||||
req_file = os.path.join(site_path, site, 'site_config.json')
|
req_file = os.path.join(site_path, site, 'site_config.json')
|
||||||
if os.path.exists(req_file):
|
if os.path.exists(req_file):
|
||||||
out = subprocess.check_output(["bench", "--site", site, "list-apps"], cwd=bench_path)
|
out = subprocess.check_output(["bench", "--site", site, "list-apps"], cwd=bench_path).decode('utf-8')
|
||||||
if re.search(r'\b' + app + r'\b', out):
|
if re.search(r'\b' + app + r'\b', out):
|
||||||
print("Cannot remove, app is installed on site: {0}".format(site))
|
print("Cannot remove, app is installed on site: {0}".format(site))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user