plint

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

commit 7ca38ea988ec3f401df1cb6c19a4b6f4d29dfae0
parent 31eb6f647ee860766a8c36fd0da2fb8ef6ef403d
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sun, 10 Jun 2012 20:11:10 +0200

fix crash in web interface when reporting some errors

Diffstat:
error.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/error.py b/error.py @@ -38,7 +38,7 @@ class ErrorBadCharacters(Error): def __init__(self, characters): self.characters = characters - def report(self): + def report(self, short=False): return Error.report(self, "Illegal character: %s" % ', '.join(["'" + a + "'" for a in self.characters])) @@ -47,7 +47,7 @@ class ErrorForbiddenPattern(Error): # TODO give more info pass - def report(self): + def report(self, short=False): return Error.report(self, "Illegal ambiguous pattern") class ErrorBadRhyme(Error): @@ -184,7 +184,7 @@ class ErrorMultipleWordOccurrence(Error): def get_id(self): return self.pattern.myid - def report(self): + def report(self, short=False): return Error.report(self, "%d occurrences of word %s for rhyme %s" % (self.occurrences, self.word, self.get_id()))