Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
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
OpenEdx
django-pipeline
Commits
6c0f7279
Commit
6c0f7279
authored
Feb 18, 2013
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix subprocess call
parent
aeae69c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
pipeline/compilers/__init__.py
+3
-3
pipeline/compressors/__init__.py
+3
-3
No files found.
pipeline/compilers/__init__.py
View file @
6c0f7279
...
@@ -5,7 +5,7 @@ import subprocess
...
@@ -5,7 +5,7 @@ import subprocess
from
django.contrib.staticfiles
import
finders
from
django.contrib.staticfiles
import
finders
from
django.core.files.base
import
ContentFile
from
django.core.files.base
import
ContentFile
from
django.utils.encoding
import
smart_str
from
django.utils.encoding
import
smart_str
,
smart_bytes
from
pipeline.conf
import
settings
from
pipeline.conf
import
settings
from
pipeline.exceptions
import
CompilerError
from
pipeline.exceptions
import
CompilerError
...
@@ -80,8 +80,8 @@ class SubProcessCompiler(CompilerBase):
...
@@ -80,8 +80,8 @@ class SubProcessCompiler(CompilerBase):
pipe
=
subprocess
.
Popen
(
command
,
shell
=
True
,
cwd
=
cwd
,
pipe
=
subprocess
.
Popen
(
command
,
shell
=
True
,
cwd
=
cwd
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stderr
=
subprocess
.
PIPE
)
if
not
content
:
if
content
:
return
content
content
=
smart_bytes
(
content
)
stdout
,
stderr
=
pipe
.
communicate
(
content
)
stdout
,
stderr
=
pipe
.
communicate
(
content
)
if
stderr
:
if
stderr
:
raise
CompilerError
(
stderr
)
raise
CompilerError
(
stderr
)
...
...
pipeline/compressors/__init__.py
View file @
6c0f7279
...
@@ -229,9 +229,9 @@ class SubProcessCompressor(CompressorBase):
...
@@ -229,9 +229,9 @@ class SubProcessCompressor(CompressorBase):
def
execute_command
(
self
,
command
,
content
):
def
execute_command
(
self
,
command
,
content
):
pipe
=
subprocess
.
Popen
(
command
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
pipe
=
subprocess
.
Popen
(
command
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
if
not
content
:
if
content
:
return
content
content
=
smart_bytes
(
content
)
stdout
,
stderr
=
pipe
.
communicate
(
smart_bytes
(
content
)
)
stdout
,
stderr
=
pipe
.
communicate
(
content
)
if
stderr
:
if
stderr
:
raise
CompressorError
(
stderr
)
raise
CompressorError
(
stderr
)
if
self
.
verbose
:
if
self
.
verbose
:
...
...
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