From 37a95855076035470e7484804ed48b779ed22277 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 4 Nov 2017 12:32:26 +0100 Subject: Affichage de la pile d’exécution lors d’une erreur de màj d’emploi du temps --- management/commands/timetables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'management') diff --git a/management/commands/timetables.py b/management/commands/timetables.py index d0bf0bd..b254788 100644 --- a/management/commands/timetables.py +++ b/management/commands/timetables.py @@ -14,6 +14,7 @@ # along with celcatsanitizer. If not, see . import datetime +import traceback from django.core.management.base import BaseCommand from django.db import transaction @@ -135,9 +136,11 @@ class Command(BaseCommand): try: process_timetable(timetable, options["force"], year, weeks) - except Exception as exc: + except Exception: self.stderr.write( - self.style.ERROR("Failed to process {0}: {1}".format(timetable, exc))) + self.style.ERROR("Failed to process {0}:".format(timetable)) + ) + self.stderr.write(self.style.ERROR(traceback.format_exc())) errcount += 1 if errcount == 0: -- cgit v1.2.1