summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
Diffstat (limited to 'pywal')
-rw-r--r--pywal/export.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pywal/export.py b/pywal/export.py
index 83dd15c..fb284bd 100644
--- a/pywal/export.py
+++ b/pywal/export.py
@@ -12,7 +12,13 @@ def template(colors, input_file, output_file=None):
"""Read template file, substitute markers and
save the file elsewhere."""
template_data = util.read_file_raw(input_file)
- template_data = "".join(template_data).format(**colors)
+
+ try:
+ template_data = "".join(template_data).format(**colors)
+ except ValueError:
+ logging.error("Syntax error in template file '%s'. "
+ "Are non-marker braces escaped? '{{}}'?" % input_file)
+ return
util.save_file(template_data, output_file)