Commit 424c6c84 by Timothée Peignier

force overwrite and close #31

parent 7b4075d5
......@@ -79,8 +79,7 @@ class Packager(object):
return self.compressor.compile_templates(package['templates'])
def save_file(self, path, content):
storage.save(path, ContentFile(content))
return path
return storage.save(path, ContentFile(content))
def create_packages(self, config):
packages = {}
......
......@@ -28,6 +28,11 @@ class PipelineStorage(FileSystemStorage):
def modified_time(self, name):
return datetime.fromtimestamp(os.path.getmtime(self.path(name)))
def get_available_name(self, name):
if self.exists(name):
self.delete(name)
return name
def _open(self, name, mode='rb'):
full_path = self.path(name)
directory = os.path.dirname(full_path)
......
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