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

chore: substitute shutil.which with find_executable on py2

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-02-20 20:02:35 +05:30
parent 0b3feb1f7b
commit 986015c13c
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED

View File

@ -405,7 +405,10 @@ def parse_commandline_args():
return args return args
if __name__ == '__main__': if __name__ == '__main__':
if sys.version[0] == '2' and not os.environ.get('CI'): if sys.version[0] == '2':
from disutils.spawn import find_executable
shutil.which = find_executable
if not os.environ.get('CI'):
if not raw_input("It is recommended to run this script with Python 3\nDo you still wish to continue? [Y/n]: ").lower() == "y": if not raw_input("It is recommended to run this script with Python 3\nDo you still wish to continue? [Y/n]: ").lower() == "y":
sys.exit() sys.exit()