Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fibre
portal-interface
Commits
0cec7f61
Commit
0cec7f61
authored
Nov 08, 2019
by
Felipe Fonseca
Browse files
Changed os.sytem call to subprocess.Popen
parent
a400348e
Changes
1
Show whitespace changes
Inline
Side-by-side
portal/views/views_tests.py
View file @
0cec7f61
...
...
@@ -10,6 +10,7 @@ from django.contrib import messages
from
django.http
import
JsonResponse
,
HttpResponse
from
crontab
import
CronTab
import
subprocess
import
portal.util
as
util
from
portal.forms.forms_projects
import
CreateProjectForm
,
UpdateProjectForm
...
...
@@ -146,7 +147,7 @@ def run_test(request):
response
=
{
'error'
:
'Could not run test'
}
try
:
script_file
=
'{}/start_checker_{}.sh'
.
format
(
scripts_folder
,
test_type
.
lower
())
os
.
system
(
script_file
)
subprocess
.
Popen
(
script_file
)
response
=
{
'success'
:
True
}
except
Exception
as
e
:
response
[
'exception'
]
=
str
(
e
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment