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
c7d53b42
Commit
c7d53b42
authored
Jan 23, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use subprocess.STDOUT, rather than sys.STDOUT to rebind stderr
parent
636122c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
i18n/execute.py
+2
-2
i18n/validate.py
+1
-1
No files found.
i18n/execute.py
View file @
c7d53b42
...
@@ -11,7 +11,7 @@ def execute(command, working_directory=BASE_DIR):
...
@@ -11,7 +11,7 @@ def execute(command, working_directory=BASE_DIR):
Output is ignored.
Output is ignored.
"""
"""
LOG
.
info
(
command
)
LOG
.
info
(
command
)
subprocess
.
check_call
(
command
,
cwd
=
working_directory
,
stderr
=
s
y
s
.
STDOUT
,
shell
=
True
)
subprocess
.
check_call
(
command
,
cwd
=
working_directory
,
stderr
=
s
ubproces
s
.
STDOUT
,
shell
=
True
)
def
call
(
command
,
working_directory
=
BASE_DIR
):
def
call
(
command
,
working_directory
=
BASE_DIR
):
...
@@ -22,7 +22,7 @@ def call(command, working_directory=BASE_DIR):
...
@@ -22,7 +22,7 @@ def call(command, working_directory=BASE_DIR):
"""
"""
LOG
.
info
(
command
)
LOG
.
info
(
command
)
p
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
cwd
=
working_directory
)
p
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
cwd
=
working_directory
,
shell
=
True
)
out
,
err
=
p
.
communicate
()
out
,
err
=
p
.
communicate
()
return
(
out
,
err
)
return
(
out
,
err
)
...
...
i18n/validate.py
View file @
c7d53b42
...
@@ -39,7 +39,7 @@ def msgfmt_check_po_file(filename):
...
@@ -39,7 +39,7 @@ def msgfmt_check_po_file(filename):
"""
"""
# Use relative paths to make output less noisy.
# Use relative paths to make output less noisy.
rfile
=
os
.
path
.
relpath
(
filename
,
LOCALE_DIR
)
rfile
=
os
.
path
.
relpath
(
filename
,
LOCALE_DIR
)
out
,
err
=
call
(
[
'msgfmt'
,
'-c'
,
rfile
]
,
working_directory
=
LOCALE_DIR
)
out
,
err
=
call
(
'msgfmt -c {}'
.
format
(
rfile
)
,
working_directory
=
LOCALE_DIR
)
if
err
!=
''
:
if
err
!=
''
:
log
.
info
(
'
\n
'
+
out
)
log
.
info
(
'
\n
'
+
out
)
log
.
warn
(
'
\n
'
+
err
)
log
.
warn
(
'
\n
'
+
err
)
...
...
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