Commit 0cec7f61 authored by Felipe Fonseca's avatar Felipe Fonseca
Browse files

Changed os.sytem call to subprocess.Popen

parent a400348e
...@@ -10,6 +10,7 @@ from django.contrib import messages ...@@ -10,6 +10,7 @@ from django.contrib import messages
from django.http import JsonResponse, HttpResponse from django.http import JsonResponse, HttpResponse
from crontab import CronTab from crontab import CronTab
import subprocess
import portal.util as util import portal.util as util
from portal.forms.forms_projects import CreateProjectForm, UpdateProjectForm from portal.forms.forms_projects import CreateProjectForm, UpdateProjectForm
...@@ -146,7 +147,7 @@ def run_test(request): ...@@ -146,7 +147,7 @@ def run_test(request):
response = {'error': 'Could not run test'} response = {'error': 'Could not run test'}
try: try:
script_file = '{}/start_checker_{}.sh'.format(scripts_folder, test_type.lower()) script_file = '{}/start_checker_{}.sh'.format(scripts_folder, test_type.lower())
os.system(script_file) subprocess.Popen(script_file)
response = {'success': True} response = {'success': True}
except Exception as e: except Exception as e:
response['exception'] = str(e) response['exception'] = str(e)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment