From 8d2b702888a19201144f56e3f8144ce7955b5664 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 21 Jun 2018 11:45:43 +0530 Subject: [PATCH] [minor] python3 fix and fix for #663 (#664) --- bench/patches/v4/update_node.py | 2 +- bench/utils.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bench/patches/v4/update_node.py b/bench/patches/v4/update_node.py index b6bab199..ffbe280c 100644 --- a/bench/patches/v4/update_node.py +++ b/bench/patches/v4/update_node.py @@ -8,7 +8,7 @@ def execute(bench_path): if node_exec: - result = subprocess.check_output([node_exec, '-v']) + result = subprocess.check_output([node_exec, '-v']).decode() else: click.echo(''' No node executable was found on your machine. diff --git a/bench/utils.py b/bench/utils.py index 36adb6ba..8d622d1f 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -94,6 +94,11 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False, setup_backups(bench_path=path) if not no_auto_update: setup_auto_update(bench_path=path) + copy_patches_txt(bench_path) + +def copy_patches_txt(bench_path): + shutil.copy(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'patches', 'patches.txt'), + os.path.join(bench_path, 'patches.txt')) def clone_apps_from(bench_path, clone_from, update_app=True): from .app import install_app