2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

Merge pull request #747 from Thunderbottom/p3.7-fix

remove-app: fix for python3.7
This commit is contained in:
Sagar Vora 2019-01-20 10:46:35 +05:30 committed by GitHub
commit 856974939b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ def remove_app(app, bench_path='.'):
for site in os.listdir(site_path):
req_file = os.path.join(site_path, site, 'site_config.json')
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):
print("Cannot remove, app is installed on site: {0}".format(site))
sys.exit(1)