From 91de91014b24412f9ec5fe246235c38a00a778ec Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 9 Nov 2017 15:51:11 +0530 Subject: Add a flag for python version while running code server in unsafe mode --- tasks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index ff5b1cb..eabf8fb 100644 --- a/tasks.py +++ b/tasks.py @@ -38,11 +38,15 @@ def getimage(ctx, image=SRC_IMAGE_NAME): ctx.run("sudo docker pull {0}".format(image)) @task -def start(ctx, ports=SERVER_POOL_PORT, image=SRC_IMAGE_NAME, unsafe=False): +def start(ctx, ports=SERVER_POOL_PORT, image=SRC_IMAGE_NAME, unsafe=False, + version=3): if unsafe: with ctx.cd(SCRIPT_DIR): print("** Initializing local code server **") - ctx.run("sudo python -m yaksh.code_server") + ctx.run("sudo python{0} -m yaksh.code_server".format( + version + ) + ) else: cmd_params = {'ports': ports, 'image': SRC_IMAGE_NAME, -- cgit