Skip to content

Commit

Permalink
make dirs if they don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Rudolph committed Dec 18, 2015
1 parent 59d3333 commit 4a0ace5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions corehq/apps/style/uglify.py
@@ -1,3 +1,4 @@
import os
import subprocess

from compressor.exceptions import FilterError
Expand Down Expand Up @@ -69,6 +70,11 @@ def output(self, mode='file', forced=False):
c.encode(self.charset) for c in content)

if settings.COMPRESS_ENABLED or forced:
js_compress_dir = os.path.join(
settings.STATIC_ROOT, self.output_dir, self.output_prefix
)
if not os.path.exists(js_compress_dir):
os.makedirs(js_compress_dir, 0775)
filepath = self.get_filepath(concatenated_content, basename=None)

# UglifySourcemapFilter writes the file directly, as it needs to
Expand Down

0 comments on commit 4a0ace5

Please sign in to comment.