Commit 4260faf1 by Timothée Peignier

fix formatting

parent c07721a2
...@@ -4,7 +4,7 @@ import subprocess ...@@ -4,7 +4,7 @@ import subprocess
try: try:
from staticfiles import finders from staticfiles import finders
except ImportError: except ImportError:
from django.contrib.staticfiles import finders # noqa from django.contrib.staticfiles import finders # noqa
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
......
...@@ -11,7 +11,7 @@ from django.utils.encoding import smart_str, force_unicode ...@@ -11,7 +11,7 @@ from django.utils.encoding import smart_str, force_unicode
try: try:
from staticfiles import finders from staticfiles import finders
except ImportError: except ImportError:
from django.contrib.staticfiles import finders # noqa from django.contrib.staticfiles import finders # noqa
from pipeline.conf import settings from pipeline.conf import settings
from pipeline.storage import default_storage from pipeline.storage import default_storage
...@@ -232,6 +232,7 @@ class SubProcessCompressor(CompressorBase): ...@@ -232,6 +232,7 @@ 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)
try: try:
pipe.stdin.write(smart_str(content)) pipe.stdin.write(smart_str(content))
except IOError, e: except IOError, e:
......
...@@ -46,8 +46,7 @@ class Jinja2Compressed(object): ...@@ -46,8 +46,7 @@ class Jinja2Compressed(object):
if type(getattr(pipeline_settings, setting)) == str: if type(getattr(pipeline_settings, setting)) == str:
val = "'%s'" % val val = "'%s'" % val
val = val if val else "''" val = val if val else "''"
expr = "pipeline_settings.%s = %s" % ( expr = "pipeline_settings.%s = %s" % (setting, val)
setting, val)
exec expr exec expr
pipeline_settings.PIPELINE = getattr(django_settings, pipeline_settings.PIPELINE = getattr(django_settings,
'PIPELINE', not django_settings.DEBUG) 'PIPELINE', not django_settings.DEBUG)
......
...@@ -4,8 +4,8 @@ try: ...@@ -4,8 +4,8 @@ try:
from staticfiles import finders from staticfiles import finders
from staticfiles.storage import CachedFilesMixin, StaticFilesStorage from staticfiles.storage import CachedFilesMixin, StaticFilesStorage
except ImportError: except ImportError:
from django.contrib.staticfiles import finders # noqa from django.contrib.staticfiles import finders # noqa
from django.contrib.staticfiles.storage import CachedFilesMixin, StaticFilesStorage # noqa from django.contrib.staticfiles.storage import CachedFilesMixin, StaticFilesStorage # noqa
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.core.files.storage import get_storage_class from django.core.files.storage import get_storage_class
......
try: try:
from staticfiles.storage import staticfiles_storage from staticfiles.storage import staticfiles_storage
except ImportError: except ImportError:
from django.contrib.staticfiles.storage import staticfiles_storage # noqa from django.contrib.staticfiles.storage import staticfiles_storage # noqa
from django import template from django import template
from django.template.loader import render_to_string from django.template.loader import render_to_string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment