Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
4fbfbf11
Commit
4fbfbf11
authored
Mar 19, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write_stderr() function is unnecessary
parent
e9b0cc71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
pavelib/servers.py
+2
-2
pavelib/utils/process.py
+1
-9
No files found.
pavelib/servers.py
View file @
4fbfbf11
...
...
@@ -6,7 +6,7 @@ import sys
import
argparse
from
paver.easy
import
*
from
.utils.cmd
import
django_cmd
from
.utils.process
import
write_stderr
,
run_process
,
run_multi_processes
from
.utils.process
import
run_process
,
run_multi_processes
DEFAULT_PORT
=
{
"lms"
:
8000
,
"studio"
:
8001
}
...
...
@@ -164,4 +164,4 @@ def check_settings(args):
sh
(
"{import_cmd} | {shell_cmd}"
.
format
(
import_cmd
=
import_cmd
,
shell_cmd
=
django_shell_cmd
))
except
:
write_stderr
(
"Failed to import settings
\n
"
)
print
(
"Failed to import settings"
,
file
=
sys
.
stderr
)
pavelib/utils/process.py
View file @
4fbfbf11
...
...
@@ -9,14 +9,6 @@ import signal
import
psutil
def
write_stderr
(
message
):
"""
Print a `message` str to stderr.
"""
sys
.
stderr
.
write
(
message
)
sys
.
stderr
.
flush
()
def
kill_process
(
proc
):
"""
Kill the process `proc` created with `subprocess`.
...
...
@@ -61,7 +53,7 @@ def run_multi_processes(cmd_list, out_log=None, err_log=None):
print
(
"Processes ending"
)
except
Exception
as
err
:
write_stderr
(
"Error running process {}
\n
"
.
format
(
err
)
)
print
(
"Error running process {}"
.
format
(
err
),
file
=
sys
.
stderr
)
finally
:
for
pid
in
pids
:
...
...
Write
Preview
Markdown
is supported
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