Fix error message when using invalid bul format
This commit is contained in:
parent
9d859ad146
commit
439571862b
@ -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 = ['<div class="notes_bulletin">']
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user