diff options
author | ankitjavalkar | 2017-11-09 15:51:11 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-11-09 15:51:11 +0530 |
commit | 91de91014b24412f9ec5fe246235c38a00a778ec (patch) | |
tree | 17bca625745b11d6152d9db1e9ebb49646d27d04 /tasks.py | |
parent | e827fa8666fa906e1b668ec43b24295889a329c5 (diff) | |
download | online_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.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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, |