@@ -149,15 +149,15 @@ def build(dir):
149149 if (out_dir == None or out_dir == "" ):
150150 if (docker == 'true' ):
151151 try :
152- output_bytes = subprocess .check_output (["./makedocker" , makestudy_dir ], cwd = concore_path )
152+ output_bytes = subprocess .check_output ([r "./makedocker" , makestudy_dir ], cwd = concore_path )
153153 output_str = output_bytes .decode ("utf-8" )
154154 proc = 0
155155 except subprocess .CalledProcessError as e :
156156 output_str = f"Docker study creation failed with return code { e .returncode } (check duplicate directory)"
157157 proc = 1
158158 else :
159159 try :
160- output_bytes = subprocess .check_output (["./makestudy" , makestudy_dir ], cwd = concore_path )
160+ output_bytes = subprocess .check_output ([r "./makestudy" , makestudy_dir ], cwd = concore_path )
161161 output_str = output_bytes .decode ("utf-8" )
162162 proc = 0
163163 except subprocess .CalledProcessError as e :
@@ -166,15 +166,15 @@ def build(dir):
166166 else :
167167 if (docker == 'true' ):
168168 try :
169- output_bytes = subprocess .check_output (["./makedocker" , makestudy_dir , out_dir ], cwd = concore_path )
169+ output_bytes = subprocess .check_output ([r "./makedocker" , makestudy_dir , out_dir ], cwd = concore_path )
170170 output_str = output_bytes .decode ("utf-8" )
171171 proc = 0
172172 except subprocess .CalledProcessError as e :
173173 output_str = f"Docker study creation failed with return code { e .returncode } (check duplicate directory)"
174174 proc = 1
175175 else :
176176 try :
177- output_bytes = subprocess .check_output (["./makestudy" , makestudy_dir , out_dir ], cwd = concore_path )
177+ output_bytes = subprocess .check_output ([r "./makestudy" , makestudy_dir , out_dir ], cwd = concore_path )
178178 output_str = output_bytes .decode ("utf-8" )
179179 proc = 0
180180 except subprocess .CalledProcessError as e :
@@ -201,17 +201,17 @@ def build(dir):
201201 proc = call (["params" , params ],shell = True , cwd = dir_path )
202202 else :
203203 try :
204- output_bytes = subprocess .check_output ("./build" , cwd = dir_path )
204+ output_bytes = subprocess .check_output (r "./build" , cwd = dir_path )
205205 output_str = output_str + output_bytes .decode ("utf-8" )
206206 resp = jsonify ({'message' : 'Directory successfully created' , 'output' : output_str })
207207 except subprocess .CalledProcessError as e :
208208 output_str = f"Build failed with return code { e .returncode } "
209209 resp = jsonify ({'message' : 'Build Failed' , 'output' : output_str })
210210 resp .status_code = 500
211211 if (maxtime != None and maxtime != '' ):
212- proc = call (["./maxtime" , maxtime ], cwd = dir_path )
212+ proc = call ([r "./maxtime" , maxtime ], cwd = dir_path )
213213 if (params != None and params != '' ):
214- proc = call (["./params" , params ], cwd = dir_path )
214+ proc = call ([r "./params" , params ], cwd = dir_path )
215215 return resp
216216
217217@app .route ('/debug/<dir>' , methods = ['POST' ])
@@ -221,7 +221,7 @@ def debug(dir):
221221 if (platform .uname ()[0 ]== 'Windows' ):
222222 proc = call (["debug" ],shell = True , cwd = dir_path )
223223 else :
224- proc = call (["./debug" ], cwd = dir_path )
224+ proc = call ([r "./debug" ], cwd = dir_path )
225225 if (proc == 0 ):
226226 resp = jsonify ({'message' : 'Close the pop window after obtaining result' })
227227 resp .status_code = 201
@@ -238,7 +238,7 @@ def run(dir):
238238 if (platform .uname ()[0 ]== 'Windows' ):
239239 proc = call (["run" ],shell = True , cwd = dir_path )
240240 else :
241- proc = call (["./run" ], cwd = dir_path )
241+ proc = call ([r "./run" ], cwd = dir_path )
242242 if (proc == 0 ):
243243 resp = jsonify ({'message' : 'result prepared' })
244244 resp .status_code = 201
@@ -255,7 +255,7 @@ def stop(dir):
255255 if (platform .uname ()[0 ]== 'Windows' ):
256256 proc = call (["stop" ],shell = True , cwd = dir_path )
257257 else :
258- proc = call (["./stop" ], cwd = dir_path )
258+ proc = call ([r "./stop" ], cwd = dir_path )
259259 if (proc == 0 ):
260260 resp = jsonify ({'message' : 'resources cleaned' })
261261 resp .status_code = 201
@@ -280,11 +280,11 @@ def clear(dir):
280280 if (params != None and params != '' ):
281281 proc = call (["params" , params ],shell = True , cwd = dir_path )
282282 else :
283- proc = call (["./clear" ], cwd = dir_path )
283+ proc = call ([r "./clear" ], cwd = dir_path )
284284 if (maxtime != None and maxtime != '' ):
285- proc = call (["./maxtime" , maxtime ], cwd = dir_path )
285+ proc = call ([r "./maxtime" , maxtime ], cwd = dir_path )
286286 if (params != None and params != '' ):
287- proc = call (["./params" , params ], cwd = dir_path )
287+ proc = call ([r "./params" , params ], cwd = dir_path )
288288 if (proc == 0 ):
289289 resp = jsonify ({'message' : 'result deleted' })
290290 resp .status_code = 201
@@ -308,9 +308,9 @@ def contribute():
308308 proc = check_output (["contribute" ,STUDY_NAME ,STUDY_NAME_PATH ,AUTHOR_NAME ,BRANCH_NAME ,PR_TITLE ,PR_BODY ],cwd = concore_path ,shell = True )
309309 else :
310310 if len (BRANCH_NAME )== 0 :
311- proc = check_output (["./contribute" ,STUDY_NAME ,STUDY_NAME_PATH ,AUTHOR_NAME ],cwd = concore_path )
311+ proc = check_output ([r "./contribute" ,STUDY_NAME ,STUDY_NAME_PATH ,AUTHOR_NAME ],cwd = concore_path )
312312 else :
313- proc = check_output (["./contribute" ,STUDY_NAME ,STUDY_NAME_PATH ,AUTHOR_NAME ,BRANCH_NAME ,PR_TITLE ,PR_BODY ],cwd = concore_path )
313+ proc = check_output ([r "./contribute" ,STUDY_NAME ,STUDY_NAME_PATH ,AUTHOR_NAME ,BRANCH_NAME ,PR_TITLE ,PR_BODY ],cwd = concore_path )
314314 output_string = proc .decode ()
315315 status = 200
316316 if output_string .find ("/pulls/" )!= - 1 :
@@ -349,7 +349,7 @@ def destroy(dir):
349349 if (platform .uname ()[0 ]== 'Windows' ):
350350 proc = call (["destroy" , dir ],shell = True , cwd = concore_path )
351351 else :
352- proc = call (["./destroy" , dir ], cwd = concore_path )
352+ proc = call ([r "./destroy" , dir ], cwd = concore_path )
353353 if (proc == 0 ):
354354 resp = jsonify ({'message' : 'Successfuly deleted Dirctory' })
355355 resp .status_code = 201
@@ -367,11 +367,11 @@ def library(dir):
367367 library_path = request .args .get ('path' )
368368 proc = 0
369369 if (library_path == None or library_path == '' ):
370- library_path = "../tools"
370+ library_path = r "../tools"
371371 if (platform .uname ()[0 ]== 'Windows' ):
372- proc = subprocess .check_output (["..\library" , library_path , filename ],shell = True , cwd = dir_path )
372+ proc = subprocess .check_output ([r "..\library" , library_path , filename ],shell = True , cwd = dir_path )
373373 else :
374- proc = subprocess .check_output (["../library" , library_path , filename ], cwd = dir_path )
374+ proc = subprocess .check_output ([r "../library" , library_path , filename ], cwd = dir_path )
375375 if (proc != 0 ):
376376 resp = jsonify ({'message' : proc .decode ("utf-8" )})
377377 resp .status_code = 201
0 commit comments