From e04a187a01009c35facc7e9561020498cb85845c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 4 Mar 2022 18:55:45 +0100 Subject: [PATCH] Exception si archive introuvable --- app/scodoc/sco_archives.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_archives.py b/app/scodoc/sco_archives.py index 159d3305a..0103caa24 100644 --- a/app/scodoc/sco_archives.py +++ b/app/scodoc/sco_archives.py @@ -70,13 +70,13 @@ from app.scodoc.sco_exceptions import ( ) from app.scodoc import html_sco_header from app.scodoc import sco_bulletins_pdf -from app.scodoc import sco_excel from app.scodoc import sco_formsemestre from app.scodoc import sco_groups from app.scodoc import sco_groups_view from app.scodoc import sco_permissions_check from app.scodoc import sco_pvjury from app.scodoc import sco_pvpdf +from app.scodoc.sco_exceptions import ScoValueError class BaseArchiver(object): @@ -254,7 +254,7 @@ class BaseArchiver(object): self.initialize() if not scu.is_valid_filename(filename): log('Archiver.get: invalid filename "%s"' % filename) - raise ValueError("invalid filename") + raise ScoValueError("archive introuvable (déjà supprimée ?)") fname = os.path.join(archive_id, filename) log("reading archive file %s" % fname) with open(fname, "rb") as f: