Commit 95def764 by Timothée Peignier

ignore CompilerError if output file exists

parent 30172498
...@@ -20,8 +20,12 @@ class Compiler(object): ...@@ -20,8 +20,12 @@ class Compiler(object):
if compiler.match_file(path): if compiler.match_file(path):
new_path = self.output_path(path, compiler.output_extension) new_path = self.output_path(path, compiler.output_extension)
content = self.read_file(path) content = self.read_file(path)
compiled_content = compiler.compile_file(content) try:
self.save_file(new_path, compiled_content) compiled_content = compiler.compile_file(content)
self.save_file(new_path, compiled_content)
except CompilerError, e:
if not os.path.exists(new_path):
raise
paths[index] = new_path paths[index] = new_path
return paths return paths
......
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