summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorankitjavalkar2017-11-09 15:51:11 +0530
committerankitjavalkar2017-11-09 15:51:11 +0530
commit91de91014b24412f9ec5fe246235c38a00a778ec (patch)
tree17bca625745b11d6152d9db1e9ebb49646d27d04 /tasks.py
parente827fa8666fa906e1b668ec43b24295889a329c5 (diff)
downloadonline_test-91de91014b24412f9ec5fe246235c38a00a778ec.tar.gz
online_test-91de91014b24412f9ec5fe246235c38a00a778ec.tar.bz2
online_test-91de91014b24412f9ec5fe246235c38a00a778ec.zip
Add a flag for python version while running code server in unsafe mode
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py8
1 files changed, 6 insertions, 2 deletions
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,