From 439571862b9a50c2bd0ec9d61758a3666bddc96c Mon Sep 17 00:00:00 2001 From: viennet Date: Tue, 13 Oct 2020 10:09:57 +0200 Subject: [PATCH] Fix error message when using invalid bul format --- sco_bulletins_generator.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sco_bulletins_generator.py b/sco_bulletins_generator.py index a9b598d6b..f89645bcc 100644 --- a/sco_bulletins_generator.py +++ b/sco_bulletins_generator.py @@ -149,8 +149,7 @@ class BulletinGenerator: return filename def generate(self, format="", stand_alone=True): - """Return bulletin in specified format - """ + """Return bulletin in specified format""" if not format in self.supported_formats: raise ValueError("unsupported bulletin format (%s)" % format) try: @@ -165,8 +164,7 @@ class BulletinGenerator: PDFLOCK.release() def generate_html(self): - """Return bulletin as an HTML string - """ + """Return bulletin as an HTML string""" H = ['
'] H.append(self.bul_table(format="html")) # table des notes H.append(self.bul_part_below(format="html")) # infos sous la table @@ -261,7 +259,7 @@ def make_formsemestre_bulletinetud( gen_class = bulletin_get_class(bul_class_name) except: raise ValueError( - "Type de bulletin PDF invalide (paramètre: %s)" % bul_pdf_class_name + "Type de bulletin PDF invalide (paramètre: %s)" % bul_class_name ) try: