Skip to content

Commit

Permalink
write to file not directory
Browse files Browse the repository at this point in the history
  • Loading branch information
emamd committed Apr 17, 2014
1 parent 1ca6edd commit 385a247
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bakery/management/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def handle(self, *args, **options):
# regex to match against. CSS, JS, JSON files
pattern = re.compile('(\.css|\.js|\.json)$')
for filename in filenames:
print os.path.join(dirpath, filename)
# reference to the original file
og_file = os.path.join(dirpath, filename)
# get the relative path that we want to copy into
Expand All @@ -103,7 +104,7 @@ def handle(self, *args, **options):
f_in.close()
# otherwise, just copy the file
else:
shutil.copy(og_file, dest_path)
shutil.copy(og_file, os.path.join(dest_path, filename))
# if gzip isn't enabled, just copy the tree straight over
else:
shutil.copytree(settings.STATIC_ROOT, target_dir)
Expand Down

0 comments on commit 385a247

Please sign in to comment.