Commit 424c6c84 by Timothée Peignier

force overwrite and close #31

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