plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit b40ad24f1c4c35ee0f2237f472675306009d25ed
parent 6cd405fb3cba8cd20a8151f9a52aa36df643fba3
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue,  5 Apr 2016 20:51:58 +0200

do not choke on ill-formed global options

Diffstat:
template.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/template.py b/template.py @@ -73,7 +73,11 @@ class Template: self.reject_errors = False def read_option(self, x): - key, value = x.split(':') + try: + key, value = x.split(':') + except ValueError: + raise error.TemplateLoadError( + _("Global options must be provided as key-value pairs")) if key in self.option_aliases.keys(): key = self.option_aliases[key] if key == 'merge':