Skip to content

Commit 9be0f29

Browse files
committed
Fix compressor calls
1 parent cd14104 commit 9be0f29

File tree

7 files changed

+16
-7
lines changed

7 files changed

+16
-7
lines changed

pipeline/compressors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def execute_command(self, command, content):
243243
else:
244244
argument_list.extend(flattening_arg)
245245

246-
pipe = subprocess.Popen(argument_list, shell=True, stdout=subprocess.PIPE,
246+
pipe = subprocess.Popen(argument_list, stdout=subprocess.PIPE,
247247
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
248248
if content:
249249
content = smart_bytes(content)

pipeline/compressors/closure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class ClosureCompressor(SubProcessCompressor):
88
def compress_js(self, js):
9-
command = '%s %s' % (settings.CLOSURE_BINARY, settings.CLOSURE_ARGUMENTS)
9+
command = (settings.CLOSURE_BINARY, settings.CLOSURE_ARGUMENTS)
1010
return self.execute_command(command, js)

pipeline/compressors/cssmin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class CSSMinCompressor(SubProcessCompressor):
88
def compress_css(self, css):
9-
command = "%s %s" % (settings.CSSMIN_BINARY, settings.CSSMIN_ARGUMENTS)
9+
command = (settings.CSSMIN_BINARY, settings.CSSMIN_ARGUMENTS)
1010
return self.execute_command(command, css)

pipeline/compressors/csstidy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ class CSSTidyCompressor(SubProcessCompressor):
1010
def compress_css(self, css):
1111
output_file = tempfile.NamedTemporaryFile(suffix='.pipeline')
1212

13-
command = '%s - %s %s' % (
13+
command = (
1414
settings.CSSTIDY_BINARY,
15+
"-",
1516
settings.CSSTIDY_ARGUMENTS,
1617
output_file.name
1718
)

pipeline/compressors/uglifyjs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class UglifyJSCompressor(SubProcessCompressor):
88
def compress_js(self, js):
9-
command = '%s %s' % (settings.UGLIFYJS_BINARY, settings.UGLIFYJS_ARGUMENTS)
9+
command = (settings.UGLIFYJS_BINARY, settings.UGLIFYJS_ARGUMENTS)
1010
if self.verbose:
1111
command += ' --verbose'
1212
return self.execute_command(command, js)

pipeline/compressors/yuglify.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class YuglifyCompressor(SubProcessCompressor):
88
def compress_common(self, content, compress_type, arguments):
9-
command = '%s --type=%s %s' % (settings.YUGLIFY_BINARY, compress_type, arguments)
9+
command = (
10+
settings.YUGLIFY_BINARY,
11+
"--type={}".format(compress_type),
12+
arguments
13+
)
1014
return self.execute_command(command, content)
1115

1216
def compress_js(self, js):

pipeline/compressors/yui.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class YUICompressor(SubProcessCompressor):
88
def compress_common(self, content, compress_type, arguments):
9-
command = '%s --type=%s %s' % (settings.YUI_BINARY, compress_type, arguments)
9+
command = (
10+
settings.YUI_BINARY,
11+
"--type={}".format(compress_type),
12+
arguments
13+
)
1014
return self.execute_command(command, content)
1115

1216
def compress_js(self, js):

0 commit comments

Comments
 (0)