aboutsummaryrefslogtreecommitdiff
path: root/management
diff options
context:
space:
mode:
authorAlban Gruin2017-11-04 12:32:26 +0100
committerAlban Gruin2017-11-04 12:32:26 +0100
commit37a95855076035470e7484804ed48b779ed22277 (patch)
treecf8763dfd9bbbe48a5383a5f49ca07437916c7a6 /management
parentc476a83d3c92d705d0bdea8b37a9aa6f10cb50ac (diff)
Affichage de la pile d’exécution lors d’une erreur de màj d’emploi du temps
Diffstat (limited to 'management')
-rw-r--r--management/commands/timetables.py7
1 files changed, 5 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
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: