mirror of
https://github.com/frappe/bench.git
synced 2025-03-21 17:02:22 +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:
parent
0b3feb1f7b
commit
986015c13c
@ -405,9 +405,12 @@ 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':
|
||||||
if not raw_input("It is recommended to run this script with Python 3\nDo you still wish to continue? [Y/n]: ").lower() == "y":
|
from disutils.spawn import find_executable
|
||||||
sys.exit()
|
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":
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if not is_sudo_user():
|
if not is_sudo_user():
|
||||||
log("Please run this script as a non-root user with sudo privileges", level=3)
|
log("Please run this script as a non-root user with sudo privileges", level=3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user